From 2a38cf110bb4928530bf9415237747073efbc066 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Thu, 25 Aug 2016 21:46:27 +0000 Subject: [PATCH] prism-auto: Don't actually execute nailgun commands in echo mode - just print them. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11742 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/etc/scripts/prism-auto | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/prism/etc/scripts/prism-auto b/prism/etc/scripts/prism-auto index 11834286..f0cd6538 100755 --- a/prism/etc/scripts/prism-auto +++ b/prism/etc/scripts/prism-auto @@ -640,7 +640,10 @@ def printUsage(): def signal_handler(signal, frame): if options.nailgun: - subprocess.Popen([options.ngprism, "stop"]).wait() + if options.echo or options.echoFull: + print(options.ngprism + "stop") + else: + subprocess.Popen([options.ngprism, " stop"]).wait() sys.exit(1) # Main program @@ -676,8 +679,11 @@ if options.logDir and not os.path.isdir(options.logDir): print("Log directory \"" + options.logDir + "\" does not exist") sys.exit(1) if options.nailgun: - os.system(options.prismExec + " -ng &") - time.sleep(0.5) + if options.echo or options.echoFull: + print(options.prismExec + " -ng &") + else: + os.system(options.prismExec + " -ng &") + time.sleep(0.5) for arg in args: if os.path.isdir(arg): benchmarkDir(arg) @@ -686,4 +692,7 @@ for arg in args: else: print("Error: File/directory " + arg + " does not exist") if options.nailgun: - subprocess.Popen([options.ngprism, "stop"]).wait() + if options.echo or options.echoFull: + print(options.ngprism + " stop") + else: + subprocess.Popen([options.ngprism, "stop"]).wait()