Browse Source

prism-auto: in nailgun mode, try to stop existing server first

Sometimes, if the prism-auto scripts gets interrupted, an existing
nailgun server is not properly shut down and might break a subsequent
prism-auto run.
master
Joachim Klein 8 years ago
committed by Dave Parker
parent
commit
fdacf84b2f
  1. 12
      prism/etc/scripts/prism-auto

12
prism/etc/scripts/prism-auto

@ -741,6 +741,15 @@ def benchmarkPropListFile(propListFile):
propFile = items[1].strip()
benchmarkPropertiesFile(os.path.join(dir, propFile))
# (Re-)start the nailgun server
# We first try to stop an existing server (which should fail quickly if there is none running)
def restartNailGunServer():
print("Stopping existing nailgun server, if it's running...")
subprocess.Popen([options.ngprism, "stop"]).wait()
print("Starting nailgun server...")
os.system(options.prismExec + " -ng &")
time.sleep(0.5)
#==================================================================================================
# Main program
#==================================================================================================
@ -803,8 +812,7 @@ if options.nailgun:
if options.echo or options.echoFull:
print(options.prismExec + " -ng &")
else:
os.system(options.prismExec + " -ng &")
time.sleep(0.5)
restartNailGunServer();
for arg in args:
if os.path.isdir(arg):
benchmarkDir(arg)

Loading…
Cancel
Save