|
@@ -6,7 +6,7 @@ from os.path import expanduser
|
|
|
|
|
|
home = expanduser("~")
|
|
home = expanduser("~")
|
|
|
|
|
|
-def start(args):
|
|
|
|
|
|
+def start(args, logfile, errfile):
|
|
setup_util.replace_text("hhvm/once.php.inc", "host=.*;", "host=" + args.database_host + ";")
|
|
setup_util.replace_text("hhvm/once.php.inc", "host=.*;", "host=" + args.database_host + ";")
|
|
setup_util.replace_text("hhvm/deploy/config.hdf", "SourceRoot = .*\/FrameworkBenchmarks", "SourceRoot = " + home + "/FrameworkBenchmarks")
|
|
setup_util.replace_text("hhvm/deploy/config.hdf", "SourceRoot = .*\/FrameworkBenchmarks", "SourceRoot = " + home + "/FrameworkBenchmarks")
|
|
setup_util.replace_text("hhvm/deploy/config.hdf", "Path = .*\/.hhvm.hhbc", "Path = " + home + "/FrameworkBenchmarks/hhvm/.hhvm.bbhc")
|
|
setup_util.replace_text("hhvm/deploy/config.hdf", "Path = .*\/.hhvm.hhbc", "Path = " + home + "/FrameworkBenchmarks/hhvm/.hhvm.bbhc")
|
|
@@ -16,16 +16,16 @@ def start(args):
|
|
if os.name == 'nt':
|
|
if os.name == 'nt':
|
|
# Not supported !
|
|
# Not supported !
|
|
return 0
|
|
return 0
|
|
- subprocess.check_call("sudo hhvm --config " + home + "/FrameworkBenchmarks/hhvm/deploy/config.hdf -m daemon", shell=True)
|
|
|
|
|
|
+ subprocess.check_call("sudo hhvm --config " + home + "/FrameworkBenchmarks/hhvm/deploy/config.hdf -m daemon", shell=True, stderr=errfile, stdout=logfile)
|
|
return 0
|
|
return 0
|
|
except subprocess.CalledProcessError:
|
|
except subprocess.CalledProcessError:
|
|
return 1
|
|
return 1
|
|
-def stop():
|
|
|
|
|
|
+def stop(logfile, errfile):
|
|
try:
|
|
try:
|
|
if os.name == 'nt':
|
|
if os.name == 'nt':
|
|
# Not Supported !
|
|
# Not Supported !
|
|
return 0
|
|
return 0
|
|
- subprocess.call("sudo kill -QUIT $( cat hhvm/hhvm.pid )", shell=True)
|
|
|
|
|
|
+ subprocess.call("sudo kill -QUIT $( cat hhvm/hhvm.pid )", shell=True, stderr=errfile, stdout=logfile)
|
|
return 0
|
|
return 0
|
|
except subprocess.CalledProcessError:
|
|
except subprocess.CalledProcessError:
|
|
return 1
|
|
return 1
|