I have written a small simulation program using python 3.5.2
and PyQt5
. I was previously using PyQt4
and had issues with intermittent segmentation faults occurring inside Qt
. For this reason, testing required the program to be run about 20 times to make sure the fault didn't occur.
Now I would like to know if there is a simple way to write a script that I can run using gdb run
which would do something like:
for i in range(20):
run MyProgram.py
wait(startup time)
input keyboard commands with appropriate intervals
wait for program to run
if error occurs:
force kill MyProgram.py
continue loop
elif runtime > some value:
input more keyboard commands
continue loop
Is there a way to do this without installing any costly software?