aboutsummaryrefslogtreecommitdiff
path: root/rpkid/tests
diff options
context:
space:
mode:
Diffstat (limited to 'rpkid/tests')
-rw-r--r--rpkid/tests/yamltest.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/rpkid/tests/yamltest.py b/rpkid/tests/yamltest.py
index 169ce7be..aa68375a 100644
--- a/rpkid/tests/yamltest.py
+++ b/rpkid/tests/yamltest.py
@@ -522,14 +522,17 @@ time.tzset()
cfg_file = "yamltest.conf"
pidfile = None
+keep_going = False
-opts, argv = getopt.getopt(sys.argv[1:], "c:hp:?", ["config=", "help", "pidfile="])
+opts, argv = getopt.getopt(sys.argv[1:], "c:hkp:?", ["config=", "help", "keep_going", "pidfile="])
for o, a in opts:
if o in ("-h", "--help", "-?"):
print __doc__
sys.exit(0)
if o in ("-c", "--config"):
cfg_file = a
+ elif o in ("-k", "--keep_going"):
+ keep_going = True
elif o in ("-p", "--pidfile"):
pidfile = a
@@ -685,7 +688,9 @@ try:
# Wait until something terminates.
signal.signal(signal.SIGCHLD, lambda *dont_care: None)
- if all(p.poll() is None for p in progs):
+ while (any(p.poll() is None for p in progs)
+ if keep_going else
+ all(p.poll() is None for p in progs)):
signal.pause()
finally: