From bcf3d77c6806571271e2e7870a5140a4ceca7cd8 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 16 Sep 2014 19:19:02 +0000 Subject: Add a mechanism yamltest can use to signal its parent that it's done with all its tedious setup actions. svn path=/branches/tk705/; revision=5957 --- ca/tests/yamltest.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ca/tests/yamltest.py') diff --git a/ca/tests/yamltest.py b/ca/tests/yamltest.py index 84355e59..6d1b0cf4 100644 --- a/ca/tests/yamltest.py +++ b/ca/tests/yamltest.py @@ -723,6 +723,8 @@ parser.add_argument("-g", "--run_gui", action = "store_true", help = "enable GUI using django-admin runserver") parser.add_argument("--browser", action = "store_true", help = "create web browser tabs for GUI") +parser.add_argument("--notify-when-startup-complete", type = int, + help = "send SIGUSR1 to this process when startup is complete") parser.add_argument("yaml_file", type = argparse.FileType("r"), help = "YAML description of test network") args = parser.parse_args() @@ -915,6 +917,10 @@ try: # Wait until something terminates. if not args.stop_after_config or args.keep_going: + if args.notify_when_startup_complete: + print + print "Sending SIGUSR1 to process", args.notify_when_startup_complete + os.kill(args.notify_when_startup_complete, signal.SIGUSR1) print print "Waiting for daemons to exit" signal.signal(signal.SIGCHLD, lambda *dont_care: None) -- cgit v1.2.3