Browse Source

18938 Updated all process calls to use logs

I changed every subprocess/process/popen/etc to redirect
the stderr and stdout to the logfile for that specific
framework test. This will cause output from tools like
Maven to write to the framework log instead of stdout/err.
Mike Smith 11 years ago
parent
commit
828c278947
100 changed files with 480 additions and 480 deletions
  1. 2 2
      HttpListener/setup.py
  2. 9 9
      README.md
  3. 2 2
      aspnet-stripped/setup_iis.py
  4. 2 2
      aspnet/setup_iis.py
  5. 2 2
      aspnet/setup_nginx.py
  6. 2 2
      aspnet/setup_xsp.py
  7. 6 6
      beego/setup.py
  8. 1 1
      bottle/setup.py
  9. 4 4
      bottle/setup_nginxuwsgi.py
  10. 1 1
      bottle/setup_py3.py
  11. 1 1
      bottle/setup_pypy.py
  12. 9 9
      cake/setup.py
  13. 5 5
      compojure/setup.py
  14. 3 3
      cowboy/setup_erlang.py
  15. 2 2
      cpoll_cppsp/setup.py
  16. 2 2
      dancer/setup.py
  17. 4 4
      dart-start/setup.py
  18. 4 4
      dart-stream/setup.py
  19. 4 4
      dart/setup.py
  20. 1 1
      django/setup.py
  21. 1 1
      django/setup_pg.py
  22. 1 1
      django/setup_py3.py
  23. 2 2
      dropwizard/setup.py
  24. 4 4
      elli/setup_erlang.py
  25. 10 10
      express/setup.py
  26. 1 1
      falcon/setup.py
  27. 1 1
      falcon/setup_py3.py
  28. 1 1
      falcon/setup_pypy.py
  29. 6 6
      falcore/setup.py
  30. 5 5
      finagle/setup.py
  31. 1 1
      flask/setup.py
  32. 4 4
      flask/setup_nginxuwsgi.py
  33. 1 1
      flask/setup_py3.py
  34. 1 1
      flask/setup_pypy.py
  35. 6 6
      go/setup.py
  36. 7 7
      grails/setup.py
  37. 2 2
      grizzly-bm/setup.py
  38. 2 2
      grizzly-jersey/setup.py
  39. 10 10
      hapi/setup.py
  40. 4 4
      http-kit/setup.py
  41. 4 4
      jester/setup.py
  42. 3 3
      kelp/setup.py
  43. 2 2
      lapis/setup.py
  44. 5 5
      lift-stateless/setup.py
  45. 5 5
      luminus/setup.py
  46. 3 3
      mojolicious/setup.py
  47. 2 2
      nancy/setup_iis.py
  48. 8 8
      nancy/setup_libevent.py
  49. 7 7
      nancy/setup_nginx.py
  50. 3 3
      nancy/setup_xsp.py
  51. 3 3
      netty/setup.py
  52. 7 7
      nodejs/setup.py
  53. 1 1
      onion/setup.py
  54. 2 2
      openresty/setup.py
  55. 9 9
      php-codeigniter/setup.py
  56. 9 9
      php-fuel/setup.py
  57. 9 9
      php-kohana/setup.py
  58. 9 9
      php-laravel/setup.py
  59. 9 9
      php-lithium/setup.py
  60. 9 9
      php-micromvc/setup.py
  61. 6 6
      php-phalcon-micro/setup.py
  62. 6 6
      php-phalcon/setup.py
  63. 5 5
      php-phpixie/setup.py
  64. 6 6
      php-senthot/setup.py
  65. 5 5
      php-silex-orm/setup.py
  66. 5 5
      php-silex/setup.py
  67. 5 5
      php-silica/setup.py
  68. 9 9
      php-slim/setup.py
  69. 8 8
      php-symfony2-stripped/setup.py
  70. 8 8
      php-symfony2/setup.py
  71. 6 6
      php-yaf/setup.py
  72. 6 6
      php/setup.py
  73. 7 7
      phreeze/setup.py
  74. 4 4
      plack/setup.py
  75. 4 4
      plain/setup.py
  76. 4 4
      play-activate-mysql/setup.py
  77. 2 2
      play-java-jpa/setup.py
  78. 2 2
      play-java/setup.py
  79. 5 5
      play-scala-mongodb/setup.py
  80. 1 1
      play-scala/setup.py
  81. 5 5
      play-slick/setup.py
  82. 2 2
      play1/setup.py
  83. 5 5
      play1siena/setup.py
  84. 10 10
      rack/setup_jruby.py
  85. 8 8
      rack/setup_ruby.py
  86. 1 1
      racket-ws/setup.py
  87. 11 11
      rails-stripped/setup_jruby.py
  88. 9 9
      rails-stripped/setup_ruby.py
  89. 11 11
      rails/setup_jruby.py
  90. 7 7
      rails/setup_ruby.py
  91. 4 4
      restexpress/setup.py
  92. 8 8
      revel-jet/setup.py
  93. 8 8
      revel-qbs/setup.py
  94. 8 8
      revel/setup.py
  95. 8 8
      ringojs-convenient/setup.py
  96. 3 3
      ringojs/setup.py
  97. 11 11
      scalatra/setup.py
  98. 2 2
      servicestack/setup_iis.py
  99. 8 8
      servicestack/setup_nginx.py
  100. 2 2
      servicestack/setup_self.py

+ 2 - 2
HttpListener/setup.py

@@ -9,7 +9,7 @@ def start(args, logfile):
   
   
   try:
   try:
     setup_util.replace_text("HttpListener/HttpListener/App.config", "localhost", args.database_host)
     setup_util.replace_text("HttpListener/HttpListener/App.config", "localhost", args.database_host)
-    subprocess.check_call("powershell -Command .\\setup.ps1 start", cwd="HttpListener")
+    subprocess.check_call("powershell -Command .\\setup.ps1 start", cwd="HttpListener", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -18,5 +18,5 @@ def stop(logfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("powershell -Command .\\setup.ps1 stop", cwd="HttpListener")
+  subprocess.check_call("powershell -Command .\\setup.ps1 stop", cwd="HttpListener", stderr=logfile, stdout=logfile)
   return 0
   return 0

+ 9 - 9
README.md

@@ -154,12 +154,12 @@ Here is an example of Wicket's setup file.
 	import setup_util
 	import setup_util
 
 
 	##################################################
 	##################################################
-	# start(args)
+	# start(args, logfile)
 	#
 	#
 	# Starts the server for Wicket
 	# Starts the server for Wicket
 	# returns 0 if everything completes, 1 otherwise
 	# returns 0 if everything completes, 1 otherwise
 	##################################################
 	##################################################
-	def start(args):
+	def start(args, logfile):
 
 
     # setting the database url
     # setting the database url
     setup_util.replace_text("wicket/src/main/webapp/WEB-INF/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
     setup_util.replace_text("wicket/src/main/webapp/WEB-INF/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
@@ -169,23 +169,23 @@ Here is an example of Wicket's setup file.
     # 3. Copy package to Resin's webapp directory
     # 3. Copy package to Resin's webapp directory
     # 4. Start resin
     # 4. Start resin
     try:
     try:
-      subprocess.check_call("mvn clean compile war:war", shell=True, cwd="wicket")
-      subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-      subprocess.check_call("cp wicket/target/hellowicket-1.0-SNAPSHOT.war $RESIN_HOME/webapps/wicket.war", shell=True)
-      subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+      subprocess.check_call("mvn clean compile war:war", shell=True, cwd="wicket", stderr=logfile, stdout=logfile)
+      subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call("cp wicket/target/hellowicket-1.0-SNAPSHOT.war $RESIN_HOME/webapps/wicket.war", shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
     except subprocess.CalledProcessError:
     except subprocess.CalledProcessError:
       return 1
       return 1
 
 
 	##################################################
 	##################################################
-	# stop()
+	# stop(logfile)
 	#
 	#
 	# Stops the server for Wicket
 	# Stops the server for Wicket
 	# returns 0 if everything completes, 1 otherwise
 	# returns 0 if everything completes, 1 otherwise
 	##################################################
 	##################################################
-	def stop():
+	def stop(logfile):
     try:
     try:
-      subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
+      subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
     except subprocess.CalledProcessError:
     except subprocess.CalledProcessError:
       return 1
       return 1

+ 2 - 2
aspnet-stripped/setup_iis.py

@@ -9,7 +9,7 @@ def start(args, logfile):
   
   
   try:
   try:
     setup_util.replace_text("aspnet-stripped/src/Web.config", "localhost", args.database_host)
     setup_util.replace_text("aspnet-stripped/src/Web.config", "localhost", args.database_host)
-    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="aspnet-stripped")
+    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="aspnet-stripped", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -18,5 +18,5 @@ def stop(logfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="aspnet-stripped")
+  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="aspnet-stripped", stderr=logfile, stdout=logfile)
   return 0
   return 0

+ 2 - 2
aspnet/setup_iis.py

@@ -9,7 +9,7 @@ def start(args, logfile):
   
   
   try:
   try:
     setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
     setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
-    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="aspnet")
+    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="aspnet", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -18,5 +18,5 @@ def stop(logfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="aspnet")
+  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="aspnet", stderr=logfile, stdout=logfile)
   return 0
   return 0

+ 2 - 2
aspnet/setup_nginx.py

@@ -16,7 +16,7 @@ def start(args, logfile):
     # build
     # build
     subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=logfile, stdout=logfile)
     subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=logfile, stdout=logfile)
     subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=logfile, stdout=logfile)
     subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=logfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER /usr/local/etc/mono", shell=True)
+    subprocess.check_call("sudo chown -R $USER:$USER /usr/local/etc/mono", shell=True, stderr=logfile, stdout=logfile)
     
     
     # nginx
     # nginx
     workers = 'worker_processes ' + str(args.max_threads) + ';'
     workers = 'worker_processes ' + str(args.max_threads) + ';'
@@ -35,7 +35,7 @@ def stop(logfile):
     return 0
     return 0
   
   
   subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=logfile, stdout=logfile)
   subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=logfile, stdout=logfile)
-  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
+  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True, stderr=logfile, stdout=logfile)
   #
   #
   # stop mono
   # stop mono
   #
   #

+ 2 - 2
aspnet/setup_xsp.py

@@ -10,9 +10,9 @@ def start(args, logfile):
   setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
   setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
 
 
   try:
   try:
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet/src")
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet/src", stderr=logfile, stdout=logfile)
     subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="aspnet/src", stderr=logfile, stdout=logfile)
     subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="aspnet/src", stderr=logfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R ubuntu:ubuntu /usr/local/etc/mono", shell=True)
+    subprocess.check_call("sudo chown -R ubuntu:ubuntu /usr/local/etc/mono", shell=True, stderr=logfile, stdout=logfile)
     subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="aspnet/src", stderr=logfile, stdout=logfile)
     subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="aspnet/src", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:

+ 6 - 6
beego/setup.py

@@ -5,16 +5,16 @@ import os
 
 
 def start(args, logfile):
 def start(args, logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\beego&&go get ./...", shell=True, cwd="beego")
-    subprocess.Popen("setup.bat", shell=True, cwd="beego")
+    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\beego&&go get ./...", shell=True, cwd="beego", stderr=logfile, stdout=logfile)
+    subprocess.Popen("setup.bat", shell=True, cwd="beego", stderr=logfile, stdout=logfile)
     return 0
     return 0
-  subprocess.call("go get ./...", shell=True, cwd="beego")
-  subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="beego")
+  subprocess.call("go get ./...", shell=True, cwd="beego", stderr=logfile, stdout=logfile)
+  subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="beego", stderr=logfile, stdout=logfile)
   return 0
   return 0
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("taskkill /f /im go.exe > NUL", shell=True)
-    subprocess.call("taskkill /f /im hello.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im go.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("taskkill /f /im hello.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 1 - 1
bottle/setup.py

@@ -19,7 +19,7 @@ def start(args, logfile):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="bottle")
+        cwd="bottle", stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 4 - 4
bottle/setup_nginxuwsgi.py

@@ -11,17 +11,17 @@ def start(args, logfile):
     setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
     setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
     try:
     try:
         subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' +
         subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' +
-            config_dir + '/nginx_uwsgi.conf', shell=True)
+            config_dir + '/nginx_uwsgi.conf', shell=True, stderr=logfile, stdout=logfile)
         # Run in the background, but keep stdout/stderr for easy debugging
         # Run in the background, but keep stdout/stderr for easy debugging
         subprocess.Popen(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi.ini' +
         subprocess.Popen(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi.ini' +
             ' --processes ' + str(NCPU * 3) +
             ' --processes ' + str(NCPU * 3) +
             ' --wsgi app:app',
             ' --wsgi app:app',
-            shell=True, cwd='bottle')
+            shell=True, cwd='bottle', stderr=logfile, stdout=logfile)
         return 0
         return 0
     except subprocess.CalledProcessError:
     except subprocess.CalledProcessError:
         return 1
         return 1
 
 
 def stop(logfile):
 def stop(logfile):
-    subprocess.call('sudo /usr/local/nginx/sbin/nginx -s stop', shell=True)
-    subprocess.call(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi_stop.ini', shell=True)
+    subprocess.call('sudo /usr/local/nginx/sbin/nginx -s stop', shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi_stop.ini', shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0

+ 1 - 1
bottle/setup_py3.py

@@ -19,7 +19,7 @@ def start(args, logfile):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="bottle")
+        cwd="bottle", stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 1 - 1
bottle/setup_pypy.py

@@ -19,7 +19,7 @@ def start(args, logfile):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="bottle")
+        cwd="bottle", stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 9 - 9
cake/setup.py

@@ -16,28 +16,28 @@ def start(args, logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
       setup_util.replace_text("cake/app/Config/core.php", "'Apc'", "'Wincache'")
       setup_util.replace_text("cake/app/Config/core.php", "'Apc'", "'Wincache'")
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\cake" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\cake\\app\\webroot"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\cake" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\cake\\app\\webroot"', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
     #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
-    subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True, stderr=logfile, stdout=logfile)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/cake/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/cake/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/cake/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/cake/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat cake/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat cake/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)
+    subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 5 - 5
compojure/setup.py

@@ -7,16 +7,16 @@ def start(args, logfile):
   setup_util.replace_text("compojure/hello/src/hello/handler.clj", ":subname \"//.*:3306", ":subname \"//" + args.database_host + ":3306")
   setup_util.replace_text("compojure/hello/src/hello/handler.clj", ":subname \"//.*:3306", ":subname \"//" + args.database_host + ":3306")
 
 
   try:
   try:
-    subprocess.check_call("lein ring uberwar", shell=True, cwd="compojure/hello")
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-    subprocess.check_call("cp compojure/hello/target/hello-compojure-standalone.war $RESIN_HOME/webapps/compojure.war", shell=True)
-    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+    subprocess.check_call("lein ring uberwar", shell=True, cwd="compojure/hello", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp compojure/hello/target/hello-compojure-standalone.war $RESIN_HOME/webapps/compojure.war", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 3 - 3
cowboy/setup_erlang.py

@@ -6,9 +6,9 @@ def start(args, logfile):
   setup_util.replace_text("cowboy/src/hello_world_app.erl", "\"benchmarkdbpass\", \".*\", 3306", "\"benchmarkdbpass\", \"" + args.database_host + "\", 3306")
   setup_util.replace_text("cowboy/src/hello_world_app.erl", "\"benchmarkdbpass\", \".*\", 3306", "\"benchmarkdbpass\", \"" + args.database_host + "\", 3306")
 
 
   try:
   try:
-    subprocess.check_call("./rebar get-deps", shell=True, cwd="cowboy")
-    subprocess.check_call("./rebar compile", shell=True, cwd="cowboy")
-    subprocess.check_call("erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s hello_world -noshell -detached", shell=True, cwd="cowboy")
+    subprocess.check_call("./rebar get-deps", shell=True, cwd="cowboy", stderr=logfile, stdout=logfile)
+    subprocess.check_call("./rebar compile", shell=True, cwd="cowboy", stderr=logfile, stdout=logfile)
+    subprocess.check_call("erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s hello_world -noshell -detached", shell=True, cwd="cowboy", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 2 - 2
cpoll_cppsp/setup.py

@@ -5,8 +5,8 @@ import setup_util
 
 
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("cpoll_cppsp/www/connectioninfo.H", "\\#define BENCHMARK_DB_HOST \".*\"", "#define BENCHMARK_DB_HOST \"" + args.database_host + "\"")
   setup_util.replace_text("cpoll_cppsp/www/connectioninfo.H", "\\#define BENCHMARK_DB_HOST \".*\"", "#define BENCHMARK_DB_HOST \"" + args.database_host + "\"")
-  subprocess.check_call("make", shell=True, cwd="cpoll_cppsp")
-  subprocess.Popen("./run_application \"$(pwd)\"/www -g g++-4.8 -m /forcedynamic.cppsm", shell=True, cwd="cpoll_cppsp");
+  subprocess.check_call("make", shell=True, cwd="cpoll_cppsp", stderr=logfile, stdout=logfile)
+  subprocess.Popen("./run_application \"$(pwd)\"/www -g g++-4.8 -m /forcedynamic.cppsm", shell=True, cwd="cpoll_cppsp", stderr=logfile, stdout=logfile);
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 2 - 2
dancer/setup.py

@@ -13,8 +13,8 @@ def start(args, logfile):
   setup_util.replace_text("dancer/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("dancer/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/dancer/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="dancer")
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/dancer/nginx.conf", shell=True)
+    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/dancer/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="dancer", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/dancer/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 4 - 4
dart-start/setup.py

@@ -10,12 +10,12 @@ def start(args, logfile):
     #
     #
     # install dart dependencies
     # install dart dependencies
     #
     #
-    subprocess.check_call('pub install', shell=True, cwd='dart-start')
+    subprocess.check_call('pub install', shell=True, cwd='dart-start', stderr=logfile, stdout=logfile)
     #
     #
     # start dart servers
     # start dart servers
     #
     #
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart-start')
+      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart-start', stderr=logfile, stdout=logfile)
     #
     #
     # create nginx configuration
     # create nginx configuration
     #
     #
@@ -52,7 +52,7 @@ def start(args, logfile):
     #
     #
     # start nginx
     # start nginx
     #
     #
-    subprocess.Popen('sudo /usr/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart-start');
+    subprocess.Popen('sudo /usr/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart-start', stderr=logfile, stdout=logfile);
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -61,7 +61,7 @@ def stop(logfile):
   #
   #
   # stop nginx
   # stop nginx
   #
   #
-  subprocess.check_call('sudo /usr/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart-start')
+  subprocess.check_call('sudo /usr/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart-start', stderr=logfile, stdout=logfile)
   os.remove('dart-start/nginx.conf')
   os.remove('dart-start/nginx.conf')
   #
   #
   # stop dart servers
   # stop dart servers

+ 4 - 4
dart-stream/setup.py

@@ -10,12 +10,12 @@ def start(args, logfile):
     #
     #
     # install dart dependencies
     # install dart dependencies
     #
     #
-    subprocess.check_call('pub install', shell=True, cwd='dart-stream')
+    subprocess.check_call('pub install', shell=True, cwd='dart-stream', stderr=logfile, stdout=logfile)
     #
     #
     # start dart servers
     # start dart servers
     #
     #
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart-stream')
+      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart-stream', stderr=logfile, stdout=logfile)
     #
     #
     # create nginx configuration
     # create nginx configuration
     #
     #
@@ -52,7 +52,7 @@ def start(args, logfile):
     #
     #
     # start nginx
     # start nginx
     #
     #
-    subprocess.Popen('sudo /usr/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart-stream');
+    subprocess.Popen('sudo /usr/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart-stream', stderr=logfile, stdout=logfile);
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -61,7 +61,7 @@ def stop(logfile):
   #
   #
   # stop nginx
   # stop nginx
   #
   #
-  subprocess.check_call('sudo /usr/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart-stream')
+  subprocess.check_call('sudo /usr/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart-stream', stderr=logfile, stdout=logfile)
   os.remove('dart-stream/nginx.conf')
   os.remove('dart-stream/nginx.conf')
   #
   #
   # stop dart servers
   # stop dart servers

+ 4 - 4
dart/setup.py

@@ -9,12 +9,12 @@ def start(args, logfile):
     #
     #
     # install dart dependencies
     # install dart dependencies
     #
     #
-    subprocess.check_call('pub install', shell=True, cwd='dart')
+    subprocess.check_call('pub install', shell=True, cwd='dart', stderr=logfile, stdout=logfile)
     #
     #
     # start dart servers
     # start dart servers
     #
     #
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart')
+      subprocess.Popen('dart server.dart -a 127.0.0.1 -p ' + str(port) + ' -d ' + str(args.max_concurrency / args.max_threads), shell=True, cwd='dart', stderr=logfile, stdout=logfile)
     #
     #
     # create nginx configuration
     # create nginx configuration
     #
     #
@@ -51,7 +51,7 @@ def start(args, logfile):
     #
     #
     # start nginx
     # start nginx
     #
     #
-    subprocess.Popen('sudo /usr/local/nginx/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart');
+    subprocess.Popen('sudo /usr/local/nginx/sbin/nginx -c `pwd`/nginx.conf', shell=True, cwd='dart', stderr=logfile, stdout=logfile);
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -60,7 +60,7 @@ def stop(logfile):
   #
   #
   # stop nginx
   # stop nginx
   #
   #
-  subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart')
+  subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd='dart', stderr=logfile, stdout=logfile)
   os.remove('dart/nginx.conf')
   os.remove('dart/nginx.conf')
   #
   #
   # stop dart servers
   # stop dart servers

+ 1 - 1
django/setup.py

@@ -24,7 +24,7 @@ def start(args, logfile):
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
         cwd="django/hello",
         cwd="django/hello",
-        env=env)
+        env=env, stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 1 - 1
django/setup_pg.py

@@ -24,7 +24,7 @@ def start(args, logfile):
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
         cwd="django/hello",
         cwd="django/hello",
-        env=env)
+        env=env, stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 1 - 1
django/setup_py3.py

@@ -21,7 +21,7 @@ def start(args, logfile):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="django/hello")
+        cwd="django/hello", stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 2 - 2
dropwizard/setup.py

@@ -10,8 +10,8 @@ def start(args, logfile):
     setup_util.replace_text("dropwizard/hello-world.yml", "url: jdbc:mysql://.*/hello_world", "url: jdbc:mysql://" + args.database_host + ":3306/hello_world")
     setup_util.replace_text("dropwizard/hello-world.yml", "url: jdbc:mysql://.*/hello_world", "url: jdbc:mysql://" + args.database_host + ":3306/hello_world")
 
 
     try:
     try:
-        subprocess.check_call("mvn clean package;", shell=True, cwd="dropwizard")
-        subprocess.Popen("java -jar target/hello-world-0.0.1-SNAPSHOT.jar server hello-world.yml", shell=True, cwd="dropwizard")
+        subprocess.check_call("mvn clean package;", shell=True, cwd="dropwizard", stderr=logfile, stdout=logfile)
+        subprocess.Popen("java -jar target/hello-world-0.0.1-SNAPSHOT.jar server hello-world.yml", shell=True, cwd="dropwizard", stderr=logfile, stdout=logfile)
         return 0
         return 0
     except subprocess.CalledProcessError:
     except subprocess.CalledProcessError:
         return 1
         return 1

+ 4 - 4
elli/setup_erlang.py

@@ -6,16 +6,16 @@ def start(args, logfile):
   setup_util.replace_text("elli/src/elli_bench_sup.erl", "\"benchmarkdbpass\", \".*\", 3306", "\"benchmarkdbpass\", \"" + args.database_host + "\", 3306")
   setup_util.replace_text("elli/src/elli_bench_sup.erl", "\"benchmarkdbpass\", \".*\", 3306", "\"benchmarkdbpass\", \"" + args.database_host + "\", 3306")
   
   
   try:
   try:
-    subprocess.check_call("./rebar get-deps", shell=True, cwd="elli")
-    subprocess.check_call("./rebar compile", shell=True, cwd="elli")
+    subprocess.check_call("./rebar get-deps", shell=True, cwd="elli", stderr=logfile, stdout=logfile)
+    subprocess.check_call("./rebar compile", shell=True, cwd="elli", stderr=logfile, stdout=logfile)
     # adding +K true seemed to actually slow performance
     # adding +K true seemed to actually slow performance
-    subprocess.check_call("erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s elli_bench -noshell -detached", shell=True, cwd="elli")
+    subprocess.check_call("erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s elli_bench -noshell -detached", shell=True, cwd="elli", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.check_call("killall beam.smp", shell=True, cwd="/usr/bin")
+    subprocess.check_call("killall beam.smp", shell=True, cwd="/usr/bin", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 10 - 10
express/setup.py

@@ -9,32 +9,32 @@ def start(args, logfile):
   setup_util.replace_text("express/app.js", "localhost", args.database_host)
   setup_util.replace_text("express/app.js", "localhost", args.database_host)
 
 
   try:
   try:
-    npm()
+    npm(logfile)
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.Popen("set NODE_ENV=production", shell=True)
-      subprocess.Popen("node app", shell=True, cwd="express")
+      subprocess.Popen("set NODE_ENV=production", shell=True, stderr=logfile, stdout=logfile)
+      subprocess.Popen("node app", shell=True, cwd="express", stderr=logfile, stdout=logfile)
     else:
     else:
-      subprocess.Popen("NODE_ENV=production node app", shell=True, cwd="express")
+      subprocess.Popen("NODE_ENV=production node app", shell=True, cwd="express", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def npm():
+def npm(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="express")
+    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="express", stderr=logfile, stdout=logfile)
     setup_util.replace_text("express/package.json", ".*mysql.*", "")
     setup_util.replace_text("express/package.json", ".*mysql.*", "")
     setup_util.replace_text("express/package.json", ".*mapper.*", "")
     setup_util.replace_text("express/package.json", ".*mapper.*", "")
   
   
   try:
   try:
-    subprocess.check_call("npm install", shell=True, cwd="express")
+    subprocess.check_call("npm install", shell=True, cwd="express", stderr=logfile, stdout=logfile)
   finally:
   finally:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call("del package.json", shell=True, cwd="express")
-      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="express")
+      subprocess.check_call("del package.json", shell=True, cwd="express", stderr=logfile, stdout=logfile)
+      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="express", stderr=logfile, stdout=logfile)
 
 
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True)
+    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   
   
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)

+ 1 - 1
falcon/setup.py

@@ -18,7 +18,7 @@ def start(args, logfile):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="falcon")
+        cwd="falcon", stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 1 - 1
falcon/setup_py3.py

@@ -18,7 +18,7 @@ def start(args, logfile):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="falcon")
+        cwd="falcon", stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 1 - 1
falcon/setup_pypy.py

@@ -18,7 +18,7 @@ def start(args, logfile):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="falcon")
+        cwd="falcon", stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 6 - 6
falcore/setup.py

@@ -9,16 +9,16 @@ def start(args, logfile):
     #subprocess.call("rmdir /s /q pkg\\windows_amd64", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q pkg\\windows_amd64", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q src\\github.com", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q src\\github.com", shell=True, cwd="go")
     #subprocess.call("del /s /q /f bin\\hello.exe", shell=True, cwd="go")
     #subprocess.call("del /s /q /f bin\\hello.exe", shell=True, cwd="go")
-    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\falcore&& go get ./...", shell=True, cwd="falcore")
-    subprocess.Popen("setup.bat", shell=True, cwd="falcore") 
+    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\falcore&& go get ./...", shell=True, cwd="falcore", stderr=logfile, stdout=logfile)
+    subprocess.Popen("setup.bat", shell=True, cwd="falcore", stderr=logfile, stdout=logfile) 
     return 0
     return 0
-  subprocess.call("go get ./...", shell=True, cwd="falcore") 
-  subprocess.Popen("go run src/framework_benchmarks/falcore.go".rsplit(" "), cwd="falcore")
+  subprocess.call("go get ./...", shell=True, cwd="falcore", stderr=logfile, stdout=logfile) 
+  subprocess.Popen("go run src/framework_benchmarks/falcore.go".rsplit(" "), cwd="falcore", stderr=logfile, stdout=logfile)
   return 0
   return 0
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("taskkill /f /im go.exe > NUL", shell=True)
-    subprocess.call("taskkill /f /im falcore.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im go.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("taskkill /f /im falcore.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 5 - 5
finagle/setup.py

@@ -8,11 +8,11 @@ def start(args, logfile):
 
 
 
 
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call("..\\sbt\\sbt.bat update compile", shell=True, cwd="finagle")
-      subprocess.Popen("..\\sbt\\sbt.bat -Ddb.host=" + args.database_host + " run", cwd="finagle", shell=True)
+      subprocess.check_call("..\\sbt\\sbt.bat update compile", shell=True, cwd="finagle", stderr=logfile, stdout=logfile)
+      subprocess.Popen("..\\sbt\\sbt.bat -Ddb.host=" + args.database_host + " run", cwd="finagle", shell=True, stderr=logfile, stdout=logfile)
     else:
     else:
-      subprocess.check_call("../sbt/sbt update compile", shell=True, cwd="finagle")
-      subprocess.Popen("../sbt/sbt -Ddb.host=" + args.database_host + " run", cwd="finagle", shell=True)
+      subprocess.check_call("../sbt/sbt update compile", shell=True, cwd="finagle", stderr=logfile, stdout=logfile)
+      subprocess.Popen("../sbt/sbt -Ddb.host=" + args.database_host + " run", cwd="finagle", shell=True, stderr=logfile, stdout=logfile)
 
 
     time.sleep(5)
     time.sleep(5)
     return 0
     return 0
@@ -21,7 +21,7 @@ def start(args, logfile):
 
 
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("wmic process where \"CommandLine LIKE '%\\\\sbt\\\\sbt%'\" call terminate")
+    subprocess.check_call("wmic process where \"CommandLine LIKE '%\\\\sbt\\\\sbt%'\" call terminate", stderr=logfile, stdout=logfile)
   else:
   else:
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()

+ 1 - 1
flask/setup.py

@@ -19,7 +19,7 @@ def start(args, logfile):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="flask")
+        cwd="flask", stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 4 - 4
flask/setup_nginxuwsgi.py

@@ -11,19 +11,19 @@ def start(args, logfile):
     setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
     setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
     try:
     try:
         subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' +
         subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' +
-            config_dir + '/nginx_uwsgi.conf', shell=True)
+            config_dir + '/nginx_uwsgi.conf', shell=True, stderr=logfile, stdout=logfile)
         # Run in the background, but keep stdout/stderr for easy debugging
         # Run in the background, but keep stdout/stderr for easy debugging
         subprocess.Popen(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi.ini' +
         subprocess.Popen(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi.ini' +
             ' --processes ' + str(NCPU * 3) +
             ' --processes ' + str(NCPU * 3) +
             ' --wsgi app:app',
             ' --wsgi app:app',
-            shell=True, cwd='flask')
+            shell=True, cwd='flask', stderr=logfile, stdout=logfile)
         return 0
         return 0
     except subprocess.CalledProcessError:
     except subprocess.CalledProcessError:
         return 1
         return 1
 
 
 def stop(logfile):
 def stop(logfile):
-    subprocess.call('sudo /usr/local/nginx/sbin/nginx -s stop', shell=True)
-    subprocess.call(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi_stop.ini', shell=True)
+    subprocess.call('sudo /usr/local/nginx/sbin/nginx -s stop', shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi_stop.ini', shell=True, stderr=logfile, stdout=logfile)
 
 
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()

+ 1 - 1
flask/setup_py3.py

@@ -19,7 +19,7 @@ def start(args, logfile):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="flask")
+        cwd="flask", stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 1 - 1
flask/setup_pypy.py

@@ -19,7 +19,7 @@ def start(args, logfile):
         "-b", "0.0.0.0:8080",
         "-b", "0.0.0.0:8080",
         '-w', str(NCPU*3),
         '-w', str(NCPU*3),
         "--log-level=critical"],
         "--log-level=critical"],
-        cwd="flask")
+        cwd="flask", stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 6 - 6
go/setup.py

@@ -9,16 +9,16 @@ def start(args, logfile):
     #subprocess.call("rmdir /s /q pkg\\windows_amd64", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q pkg\\windows_amd64", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q src\\github.com", shell=True, cwd="go")
     #subprocess.call("rmdir /s /q src\\github.com", shell=True, cwd="go")
     #subprocess.call("del /s /q /f bin\\hello.exe", shell=True, cwd="go")
     #subprocess.call("del /s /q /f bin\\hello.exe", shell=True, cwd="go")
-    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\go&& go get ./...", shell=True, cwd="go")
-    subprocess.Popen("setup.bat", shell=True, cwd="go") 
+    subprocess.call("set GOPATH=C:\\FrameworkBenchmarks\\go&& go get ./...", shell=True, cwd="go", stderr=logfile, stdout=logfile)
+    subprocess.Popen("setup.bat", shell=True, cwd="go", stderr=logfile, stdout=logfile) 
     return 0
     return 0
-  subprocess.call("go get ./...", shell=True, cwd="go") 
-  subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="go")
+  subprocess.call("go get ./...", shell=True, cwd="go", stderr=logfile, stdout=logfile) 
+  subprocess.Popen("go run src/hello/hello.go".rsplit(" "), cwd="go", stderr=logfile, stdout=logfile)
   return 0
   return 0
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("taskkill /f /im go.exe > NUL", shell=True)
-    subprocess.call("taskkill /f /im hello.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im go.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("taskkill /f /im hello.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 7 - 7
grails/setup.py

@@ -7,18 +7,18 @@ def start(args, logfile):
   setup_util.replace_text("grails/hello/grails-app/conf/DataSource.groovy", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   setup_util.replace_text("grails/hello/grails-app/conf/DataSource.groovy", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   
   
   try:
   try:
-    subprocess.check_call("grails install-dependency mysql:mysql-connector-java:5.1.22", shell=True, cwd="grails/hello")
-    subprocess.check_call("grails war", shell=True, cwd="grails/hello")
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-    subprocess.check_call("cp grails/hello/target/hello-0.1.war $RESIN_HOME/webapps/grails.war", shell=True)
-    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+    subprocess.check_call("grails install-dependency mysql:mysql-connector-java:5.1.22", shell=True, cwd="grails/hello", stderr=logfile, stdout=logfile)
+    subprocess.check_call("grails war", shell=True, cwd="grails/hello", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp grails/hello/target/hello-0.1.war $RESIN_HOME/webapps/grails.war", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
-    subprocess.check_call("rm -rf $RESIN_HOME/resin-data/*", shell=True)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/resin-data/*", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 2 - 2
grizzly-bm/setup.py

@@ -5,8 +5,8 @@ import os
 
 
 def start(args, logfile):
 def start(args, logfile):
   try:
   try:
-    subprocess.check_call("mvn clean compile assembly:single", shell=True, cwd="grizzly-bm")
-    subprocess.Popen("java -jar grizzly-bm-0.1-jar-with-dependencies.jar".rsplit(" "), cwd="grizzly-bm/target")
+    subprocess.check_call("mvn clean compile assembly:single", shell=True, cwd="grizzly-bm", stderr=logfile, stdout=logfile)
+    subprocess.Popen("java -jar grizzly-bm-0.1-jar-with-dependencies.jar".rsplit(" "), cwd="grizzly-bm/target", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 2 - 2
grizzly-jersey/setup.py

@@ -5,8 +5,8 @@ import os
 
 
 def start(args, logfile):
 def start(args, logfile):
   try:
   try:
-    subprocess.check_call("mvn clean package", shell=True, cwd="grizzly-jersey")
-    subprocess.Popen(("java -jar target/grizzly-jersey-example.jar -dbhost " + args.database_host).rsplit(" "), cwd="grizzly-jersey")
+    subprocess.check_call("mvn clean package", shell=True, cwd="grizzly-jersey", stderr=logfile, stdout=logfile)
+    subprocess.Popen(("java -jar target/grizzly-jersey-example.jar -dbhost " + args.database_host).rsplit(" "), cwd="grizzly-jersey", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 10 - 10
hapi/setup.py

@@ -7,31 +7,31 @@ def start(args, logfile):
   setup_util.replace_text("hapi/app.js", "localhost", args.database_host)
   setup_util.replace_text("hapi/app.js", "localhost", args.database_host)
 
 
   try:
   try:
-    npm()
+    npm(logfile)
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.Popen("set NODE_ENV=production", shell=True)
-      subprocess.Popen("node app", shell=True, cwd="hapi")
+      subprocess.Popen("set NODE_ENV=production", shell=True, stderr=logfile, stdout=logfile)
+      subprocess.Popen("node app", shell=True, cwd="hapi", stderr=logfile, stdout=logfile)
     else:
     else:
-      subprocess.Popen("NODE_ENV=production node app", shell=True, cwd="hapi")
+      subprocess.Popen("NODE_ENV=production node app", shell=True, cwd="hapi", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def npm():
+def npm(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="hapi")
+    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="hapi", stderr=logfile, stdout=logfile)
     setup_util.replace_text("hapi/package.json", ".*mapper.*", "")
     setup_util.replace_text("hapi/package.json", ".*mapper.*", "")
 
 
   try:
   try:
-    subprocess.check_call("npm install", shell=True, cwd="hapi")
+    subprocess.check_call("npm install", shell=True, cwd="hapi", stderr=logfile, stdout=logfile)
   finally:
   finally:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call("del package.json", shell=True, cwd="hapi")
-      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="hapi")
+      subprocess.check_call("del package.json", shell=True, cwd="hapi", stderr=logfile, stdout=logfile)
+      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="hapi", stderr=logfile, stdout=logfile)
 
 
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True)
+    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
 
 
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)

+ 4 - 4
http-kit/setup.py

@@ -6,14 +6,14 @@ import setup_util
 def start(args, logfile):
 def start(args, logfile):
 
 
   try:
   try:
-    subprocess.check_call("lein deps", shell=True, cwd="http-kit/hello")
+    subprocess.check_call("lein deps", shell=True, cwd="http-kit/hello", stderr=logfile, stdout=logfile)
     subprocess.check_call("rm -rf target", shell=True, cwd="http-kit/hello")
     subprocess.check_call("rm -rf target", shell=True, cwd="http-kit/hello")
     # pack all dependencies into a single jar: target/http-kit-standalone.jar
     # pack all dependencies into a single jar: target/http-kit-standalone.jar
-    subprocess.check_call("lein uberjar", shell=True, cwd="http-kit/hello")
+    subprocess.check_call("lein uberjar", shell=True, cwd="http-kit/hello", stderr=logfile, stdout=logfile)
     # -server is much faster
     # -server is much faster
     # 'lein run' passes '-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1' which make it starts fast, but runs slow
     # 'lein run' passes '-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1' which make it starts fast, but runs slow
     command = "java -server -jar target/http-kit-standalone.jar --db-host " + args.database_host
     command = "java -server -jar target/http-kit-standalone.jar --db-host " + args.database_host
-    subprocess.Popen(command, shell=True, cwd="http-kit/hello")
+    subprocess.Popen(command, shell=True, cwd="http-kit/hello", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -21,7 +21,7 @@ def start(args, logfile):
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     # listen on 8080
     # listen on 8080
-    subprocess.check_call("lsof -t -sTCP:LISTEN -i:8080 | xargs kill", shell=True)
+    subprocess.check_call("lsof -t -sTCP:LISTEN -i:8080 | xargs kill", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 4 - 4
jester/setup.py

@@ -7,15 +7,15 @@ from os.path import expanduser
 home = expanduser("~")
 home = expanduser("~")
 
 
 def start(args, logfile):
 def start(args, logfile):
-  subprocess.check_call("nimrod c -d:release --path:../installs/jester/jester hello.nim", shell=True, cwd="jester")
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/jester/config/nginx.conf", shell=True)
+  subprocess.check_call("nimrod c -d:release --path:../installs/jester/jester hello.nim", shell=True, cwd="jester", stderr=logfile, stdout=logfile)
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/jester/config/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
   
   
   for i in range(0, 8):
   for i in range(0, 8):
-    subprocess.Popen("./hello 900" + str(i) + " > /dev/null", shell=True, cwd="jester")
+    subprocess.Popen("./hello 900" + str(i), shell=True, cwd="jester", stderr=logfile, stdout=logfile)
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):
-  subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
+  subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
 
 
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 3 - 3
kelp/setup.py

@@ -13,14 +13,14 @@ def start(args, logfile):
   setup_util.replace_text("kelp/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("kelp/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/kelp/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="kelp")
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/kelp/nginx.conf", shell=True)
+    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/kelp/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="kelp", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/kelp/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()
     for line in out.splitlines():
     for line in out.splitlines():

+ 2 - 2
lapis/setup.py

@@ -6,11 +6,11 @@ import os
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("lapis/nginx.conf", "CWD", os.getcwd())
   setup_util.replace_text("lapis/nginx.conf", "CWD", os.getcwd())
   setup_util.replace_text("lapis/nginx.conf", "DBHOSTNAME", args.database_host)
   setup_util.replace_text("lapis/nginx.conf", "DBHOSTNAME", args.database_host)
-  subprocess.Popen('/usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -g "worker_processes ' + str((args.max_threads)) + ';"', shell=True, cwd="lapis")
+  subprocess.Popen('/usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -g "worker_processes ' + str((args.max_threads)) + ';"', shell=True, cwd="lapis", stderr=logfile, stdout=logfile)
 
 
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):
-  subprocess.Popen('/usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd="lapis")
+  subprocess.Popen('/usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd="lapis", stderr=logfile, stdout=logfile)
 
 
   return 0
   return 0

+ 5 - 5
lift-stateless/setup.py

@@ -9,17 +9,17 @@ def start(args, logfile):
   setup_util.replace_text("lift-stateless/src/main/scala/Main.scala", "> \".*:3306", "> \"" + args.database_host + ":3306")
   setup_util.replace_text("lift-stateless/src/main/scala/Main.scala", "> \".*:3306", "> \"" + args.database_host + ":3306")
 
 
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call('"..\\sbt\\sbt.bat" update assembly', shell=True, cwd="lift-stateless")
-    subprocess.Popen(".\\run.bat", shell=True, cwd="lift-stateless")  
+    subprocess.check_call('"..\\sbt\\sbt.bat" update assembly', shell=True, cwd="lift-stateless", stderr=logfile, stdout=logfile)
+    subprocess.Popen(".\\run.bat", shell=True, cwd="lift-stateless", stderr=logfile, stdout=logfile)  
   else:
   else:
-    subprocess.check_call("../sbt/sbt update assembly", shell=True, cwd="lift-stateless")
-    subprocess.Popen("./run", shell=True, cwd="lift-stateless")
+    subprocess.check_call("../sbt/sbt update assembly", shell=True, cwd="lift-stateless", stderr=logfile, stdout=logfile)
+    subprocess.Popen("./run", shell=True, cwd="lift-stateless", stderr=logfile, stdout=logfile)
 
 
   time.sleep(5)
   time.sleep(5)
   return 0
   return 0
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("wmic process where \"CommandLine LIKE '%lift-stateless-assembly%'\" call terminate")
+    subprocess.check_call("wmic process where \"CommandLine LIKE '%lift-stateless-assembly%'\" call terminate", stderr=logfile, stdout=logfile)
   else:
   else:
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()

+ 5 - 5
luminus/setup.py

@@ -7,16 +7,16 @@ def start(args, logfile):
   setup_util.replace_text("luminus/hello/src/hello/models/schema.clj", ":subname \"//.*:3306", ":subname \"//" + args.database_host + ":3306")
   setup_util.replace_text("luminus/hello/src/hello/models/schema.clj", ":subname \"//.*:3306", ":subname \"//" + args.database_host + ":3306")
 
 
   try:
   try:
-    subprocess.check_call("lein ring uberwar", shell=True, cwd="luminus/hello")
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-    subprocess.check_call("cp luminus/hello/target/hello-luminus-standalone.war $RESIN_HOME/webapps/luminus.war", shell=True)
-    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+    subprocess.check_call("lein ring uberwar", shell=True, cwd="luminus/hello", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp luminus/hello/target/hello-luminus-standalone.war $RESIN_HOME/webapps/luminus.war", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 3 - 3
mojolicious/setup.py

@@ -13,14 +13,14 @@ def start(args, logfile):
   setup_util.replace_text("mojolicious/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
   setup_util.replace_text("mojolicious/nginx.conf", "server unix:.*\/FrameworkBenchmarks", "server unix:" + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/mojolicious/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="mojolicious")
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/mojolicious/nginx.conf", shell=True)
+    subprocess.Popen("plackup -E production -s Starman --workers=" + str(args.max_threads) + " -l " + home + "/FrameworkBenchmarks/mojolicious/frameworks-benchmark.sock -a ./app.pl", shell=True, cwd="mojolicious", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/mojolicious/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()
     for line in out.splitlines():
     for line in out.splitlines():

+ 2 - 2
nancy/setup_iis.py

@@ -9,7 +9,7 @@ def start(args, logfile):
   
   
   try:
   try:
     setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
     setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
-    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="nancy")
+    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="nancy", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -18,5 +18,5 @@ def stop(logfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="nancy")
+  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="nancy", stderr=logfile, stdout=logfile)
   return 0
   return 0

+ 8 - 8
nancy/setup_libevent.py

@@ -14,18 +14,18 @@ def start(args, logfile):
 
 
   try:
   try:
     # build
     # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app)
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=logfile, stdout=logfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=logfile, stdout=logfile)
     
     
     # nginx
     # nginx
     workers = 'worker_processes ' + str(args.max_threads) + ';'
     workers = 'worker_processes ' + str(args.max_threads) + ';'
-    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True);
-    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf.libevent -g "' + workers + '"', shell=True)
+    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True, stderr=logfile, stdout=logfile);
+    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf.libevent -g "' + workers + '"', shell=True, stderr=logfile, stdout=logfile)
     
     
     # fastcgi
     # fastcgi
     os.environ['MONO_GC_PARAMS']="nursery-size=16m"
     os.environ['MONO_GC_PARAMS']="nursery-size=16m"
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("mono-sgen -O=all LibeventHost/bin/Release/LibeventHost.exe 127.0.0.1 " + str(port) + " " + args.database_host + " &", shell=True, cwd=app)
+      subprocess.Popen("mono-sgen -O=all LibeventHost/bin/Release/LibeventHost.exe 127.0.0.1 " + str(port) + " " + args.database_host + " &", shell=True, cwd=app, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -34,7 +34,7 @@ def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True)
-  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
-  subprocess.check_call("pkill -9 mono-sgen", shell=True)
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=logfile, stdout=logfile)
+  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True, stderr=logfile, stdout=logfile)
+  subprocess.check_call("pkill -9 mono-sgen", shell=True, stderr=logfile, stdout=logfile)
   return 0
   return 0

+ 7 - 7
nancy/setup_nginx.py

@@ -14,17 +14,17 @@ def start(args, logfile):
 
 
   try:
   try:
     # build
     # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app)
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=logfile, stdout=logfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=logfile, stdout=logfile)
     
     
     # nginx
     # nginx
     workers = 'worker_processes ' + str(args.max_threads) + ';'
     workers = 'worker_processes ' + str(args.max_threads) + ';'
-    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True);
-    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True)
+    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True, stderr=logfile, stdout=logfile);
+    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True, stderr=logfile, stdout=logfile)
     
     
     # fastcgi
     # fastcgi
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
+      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -33,8 +33,8 @@ def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True)
-  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=logfile, stdout=logfile)
+  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True, stderr=logfile, stdout=logfile)
   #
   #
   # stop mono
   # stop mono
   #
   #

+ 3 - 3
nancy/setup_xsp.py

@@ -10,9 +10,9 @@ def start(args, logfile):
   setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
   setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
 
 
   try:
   try:
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd="nancy/src")
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="nancy/src")
-    subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="nancy/src")
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd="nancy/src", stderr=logfile, stdout=logfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="nancy/src", stderr=logfile, stdout=logfile)
+    subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="nancy/src", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 3 - 3
netty/setup.py

@@ -5,14 +5,14 @@ import os
 
 
 def start(args, logfile):
 def start(args, logfile):
   try:
   try:
-    subprocess.check_call("mvn clean compile assembly:single", shell=True, cwd="netty")
-    subprocess.Popen("java -Dio.netty.noResourceLeakDetection=true -jar netty-example-0.1-jar-with-dependencies.jar".rsplit(" "), cwd="netty/target")
+    subprocess.check_call("mvn clean compile assembly:single", shell=True, cwd="netty", stderr=logfile, stdout=logfile)
+    subprocess.Popen("java -Dio.netty.noResourceLeakDetection=true -jar netty-example-0.1-jar-with-dependencies.jar".rsplit(" "), cwd="netty/target", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("wmic process where \"CommandLine LIKE '%netty-example%'\" call terminate")
+    subprocess.check_call("wmic process where \"CommandLine LIKE '%netty-example%'\" call terminate", stderr=logfile, stdout=logfile)
   else:
   else:
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()

+ 7 - 7
nodejs/setup.py

@@ -9,28 +9,28 @@ def start(args, logfile):
   setup_util.replace_text("nodejs/hello.js", "localhost", args.database_host)
   setup_util.replace_text("nodejs/hello.js", "localhost", args.database_host)
 
 
   try:
   try:
-    npm()
-    subprocess.Popen("node hello.js", shell=True, cwd="nodejs")
+    npm(logfile)
+    subprocess.Popen("node hello.js", shell=True, cwd="nodejs", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
-def npm():
+def npm(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="nodejs")
+    subprocess.check_call("copy package.json package.json.dist /y > NUL", shell=True, cwd="nodejs", stderr=logfile, stdout=logfile)
     setup_util.replace_text("nodejs/package.json", ".*mysql.*", "")
     setup_util.replace_text("nodejs/package.json", ".*mysql.*", "")
     setup_util.replace_text("nodejs/package.json", ".*mapper.*", "")
     setup_util.replace_text("nodejs/package.json", ".*mapper.*", "")
   
   
   try:
   try:
-    subprocess.check_call("npm install", shell=True, cwd="nodejs")
+    subprocess.check_call("npm install", shell=True, cwd="nodejs", stderr=logfile, stdout=logfile)
   finally:
   finally:
     if os.name == 'nt':
     if os.name == 'nt':
       subprocess.check_call("del package.json", shell=True, cwd="nodejs")
       subprocess.check_call("del package.json", shell=True, cwd="nodejs")
-      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="nodejs")
+      subprocess.check_call("ren package.json.dist package.json", shell=True, cwd="nodejs", stderr=logfile, stdout=logfile)
 
 
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True)
+    subprocess.Popen("taskkill /f /im node.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   
   
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)

+ 1 - 1
onion/setup.py

@@ -6,7 +6,7 @@ import setup_util
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("onion/hello.c", "mysql_real_connect\(data.db\[i\], \".*\",", "mysql_real_connect(data.db[i], \"" + args.database_host + "\",")
   setup_util.replace_text("onion/hello.c", "mysql_real_connect\(data.db\[i\], \".*\",", "mysql_real_connect(data.db[i], \"" + args.database_host + "\",")
   os.putenv("ONION_LOG","noinfo")
   os.putenv("ONION_LOG","noinfo")
-  subprocess.Popen("make && ./hello", shell=True, cwd="onion")
+  subprocess.Popen("make && ./hello", shell=True, cwd="onion", stderr=logfile, stdout=logfile)
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 2 - 2
openresty/setup.py

@@ -6,11 +6,11 @@ import os
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("openresty/nginx.conf", "CWD", os.getcwd())
   setup_util.replace_text("openresty/nginx.conf", "CWD", os.getcwd())
   setup_util.replace_text("openresty/app.lua", "DBHOSTNAME", args.database_host)
   setup_util.replace_text("openresty/app.lua", "DBHOSTNAME", args.database_host)
-  subprocess.Popen('sudo /usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -g "worker_processes ' + str((args.max_threads)) + ';"', shell=True, cwd="openresty")
+  subprocess.Popen('sudo /usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -g "worker_processes ' + str((args.max_threads)) + ';"', shell=True, cwd="openresty", stderr=logfile, stdout=logfile)
 
 
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):
-  subprocess.Popen('sudo /usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd="openresty")
+  subprocess.Popen('sudo /usr/local/openresty/nginx/sbin/nginx -c `pwd`/nginx.conf -s stop', shell=True, cwd="openresty", stderr=logfile, stdout=logfile)
 
 
   return 0
   return 0

+ 9 - 9
php-codeigniter/setup.py

@@ -12,23 +12,23 @@ def start(args, logfile):
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-codeigniter" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-codeigniter"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-codeigniter" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-codeigniter"', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-codeigniter", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-codeigniter/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-codeigniter/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-codeigniter", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-codeigniter/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-codeigniter/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-codeigniter/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-codeigniter", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-codeigniter/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-codeigniter", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 9 - 9
php-fuel/setup.py

@@ -12,23 +12,23 @@ def start(args, logfile):
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-fuel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-fuel"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-fuel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-fuel"', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-fuel", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-fuel/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-fuel/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-fuel", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-fuel/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-fuel/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-fuel/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-fuel", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-fuel/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-fuel", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 9 - 9
php-kohana/setup.py

@@ -12,23 +12,23 @@ def start(args, logfile):
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-kohana" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-kohana"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-kohana" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-kohana"', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-kohana", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-kohana/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-kohana/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-kohana", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-kohana/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-kohana/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('appcmd delete site PHP', shell=True)
+      subprocess.check_call('appcmd delete site PHP', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-kohana/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-kohana", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-kohana/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-kohana", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 9 - 9
php-laravel/setup.py

@@ -12,23 +12,23 @@ def start(args, logfile):
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-laravel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-laravel\\public"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-laravel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-laravel\\public"', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-laravel", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-laravel/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-laravel/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-laravel", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-laravel/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-laravel/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-laravel/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-laravel", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-laravel/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-laravel", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 9 - 9
php-lithium/setup.py

@@ -12,23 +12,23 @@ def start(args, logfile):
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-lithium" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-lithium"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-lithium" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-lithium"', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-lithium", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-lithium/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-lithium/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-lithium", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-lithium/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-lithium/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-lithium/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-lithium", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-lithium/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-lithium", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 9 - 9
php-micromvc/setup.py

@@ -12,23 +12,23 @@ def start(args, logfile):
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-micromvc" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-micromvc\Public"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-micromvc" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-micromvc\Public"', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-micromvc", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-micromvc/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-micromvc/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-micromvc", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-micromvc/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-micromvc/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-micromvc/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-micromvc", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-micromvc/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-micromvc", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 6 - 6
php-phalcon-micro/setup.py

@@ -10,17 +10,17 @@ def start(args, logfile):
   setup_util.replace_text("php-phalcon-micro/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-phalcon-micro/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-phalcon-micro", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phalcon-micro/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phalcon-micro/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-phalcon-micro", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phalcon-micro/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phalcon-micro/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-phalcon-micro/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-phalcon-micro", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-phalcon-micro/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-phalcon-micro", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 6 - 6
php-phalcon/setup.py

@@ -10,17 +10,17 @@ def start(args, logfile):
   setup_util.replace_text("php-phalcon/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-phalcon/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-phalcon", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phalcon/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phalcon/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-phalcon", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phalcon/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phalcon/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-phalcon/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-phalcon", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-phalcon/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-phalcon", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 5 - 5
php-phpixie/setup.py

@@ -12,16 +12,16 @@ def start(args, logfile):
   setup_util.replace_text("php-phpixie/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-phpixie/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-phpixie")        
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phpixie/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phpixie/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-phpixie", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-phpixie/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-phpixie/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-phpixie/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-phpixie/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 6 - 6
php-senthot/setup.py

@@ -10,18 +10,18 @@ def start(args, logfile):
   setup_util.replace_text("php-senthot/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-senthot/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-senthot", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-senthot/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-senthot/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-senthot", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-senthot/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-senthot/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-senthot/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-senthot", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-senthot/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-senthot", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 5 - 5
php-silex-orm/setup.py

@@ -17,16 +17,16 @@ def start(args, logfile):
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("composer.phar install", shell=True, cwd="php-silex-orm")
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silex-orm/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silex-orm/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install", shell=True, cwd="php-silex-orm", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silex-orm/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silex-orm/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-silex-orm/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-silex-orm/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)

+ 5 - 5
php-silex/setup.py

@@ -16,16 +16,16 @@ def start(args, logfile):
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-silex")        
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silex/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silex/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-silex", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silex/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silex/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-silex/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-silex/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    

+ 5 - 5
php-silica/setup.py

@@ -17,16 +17,16 @@ def start(args, logfile):
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo a2ensite cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("composer.phar install", shell=True, cwd="php-silica")        
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silica/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silica/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install", shell=True, cwd="php-silica", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-silica/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-silica/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-silica/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-silica/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo a2dissite cake", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    
     #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    

+ 9 - 9
php-slim/setup.py

@@ -12,23 +12,23 @@ def start(args, logfile):
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-slim" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-slim"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-slim" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-slim"', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-slim", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-slim/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-slim/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-slim", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-slim/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-slim/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-slim/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-slim", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-slim/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-slim", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 8
php-symfony2-stripped/setup.py

@@ -10,19 +10,19 @@ def start(args, logfile):
   setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-symfony2")
-    subprocess.check_call("php app/console cache:clear --env=prod --no-debug", shell=True, cwd="php-symfony2")
-    subprocess.check_call("sudo chown -R www-data:www-data php-symfony2", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-symfony2/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-symfony2/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-symfony2", stderr=logfile, stdout=logfile)
+    subprocess.check_call("php app/console cache:clear --env=prod --no-debug", shell=True, cwd="php-symfony2", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R www-data:www-data php-symfony2", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-symfony2/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-symfony2/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-symfony2/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-symfony2", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-symfony2/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-symfony2", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 8
php-symfony2/setup.py

@@ -10,19 +10,19 @@ def start(args, logfile):
   setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-symfony2")
-    subprocess.check_call("php app/console cache:clear --env=prod --no-debug", shell=True, cwd="php-symfony2")
-    subprocess.check_call("sudo chown -R www-data:www-data php-symfony2", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-symfony2/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-symfony2/deploy/nginx.conf", shell=True)
+    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-symfony2", stderr=logfile, stdout=logfile)
+    subprocess.check_call("php app/console cache:clear --env=prod --no-debug", shell=True, cwd="php-symfony2", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R www-data:www-data php-symfony2", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-symfony2/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-symfony2/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-symfony2/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-symfony2", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-symfony2/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-symfony2", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 6 - 6
php-yaf/setup.py

@@ -10,18 +10,18 @@ def start(args, logfile):
   setup_util.replace_text("php-yaf/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
   setup_util.replace_text("php-yaf/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
 
   try:
   try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-yaf", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-yaf/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-yaf/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo chown -R www-data:www-data php-yaf", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-yaf/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-yaf/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 
 
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php-yaf/deploy/php-fpm.pid )", shell=True)
-    subprocess.check_call("sudo chown -R $USER:$USER php-yaf", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php-yaf/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo chown -R $USER:$USER php-yaf", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 6 - 6
php/setup.py

@@ -18,15 +18,15 @@ def start(args, logfile):
   
   
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php"', shell=True)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php"', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
     
     
     #subprocess.check_call("sudo cp php/deploy/php /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo cp php/deploy/php /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo a2ensite php", shell=True)
     #subprocess.check_call("sudo a2ensite php", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     
     
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
@@ -34,11 +34,11 @@ def start(args, logfile):
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('appcmd delete site PHP', shell=True)
+      subprocess.check_call('appcmd delete site PHP', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
     
     
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat php/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat php/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
     
     
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:

+ 7 - 7
phreeze/setup.py

@@ -14,15 +14,15 @@ def start(args, logfile):
   
   
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\phreeze" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\phreeze"', shell=True)
+      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\phreeze" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\phreeze"', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
     #subprocess.check_call("sudo cp php/deploy/phreeze /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo cp php/deploy/phreeze /etc/apache2/sites-available/", shell=True)
     #subprocess.check_call("sudo a2ensite php", shell=True)
     #subprocess.check_call("sudo a2ensite php", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
     #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
     #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/phreeze/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/phreeze/deploy/nginx.conf", shell=True)
+    subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/phreeze/deploy/php-fpm.pid", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/phreeze/deploy/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
     
     
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
@@ -30,10 +30,10 @@ def start(args, logfile):
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True)
+      subprocess.call('appcmd delete site PHP', shell=True, stderr=logfile, stdout=logfile)
       return 0
       return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat phreeze/deploy/php-fpm.pid )", shell=True)
+    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("sudo kill -QUIT $( cat phreeze/deploy/php-fpm.pid )", shell=True, stderr=logfile, stdout=logfile)
     
     
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:

+ 4 - 4
plack/setup.py

@@ -6,16 +6,16 @@ import os
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("plack/app.psgi", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("plack/app.psgi", "localhost", ""+ args.database_host +"")
   try:
   try:
-    subprocess.check_call("curl -L http://cpanmin.us | perl - App::cpanminus", shell=True, cwd="plack")
-    subprocess.check_call("cpanm --installdeps .", shell=True, cwd="plack")
-    pid = subprocess.Popen("plackup -E production -s Monoceros -l :8080 --max-workers=" + str(args.max_threads) + " app.psgi", shell=True, cwd="plack").pid
+    subprocess.check_call("curl -L http://cpanmin.us | perl - App::cpanminus", shell=True, cwd="plack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cpanm --installdeps .", shell=True, cwd="plack", stderr=logfile, stdout=logfile)
+    pid = subprocess.Popen("plackup -E production -s Monoceros -l :8080 --max-workers=" + str(args.max_threads) + " app.psgi", shell=True, cwd="plack", stderr=logfile, stdout=logfile).pid
     open('plack/app.pid', 'w').write(str(pid))
     open('plack/app.pid', 'w').write(str(pid))
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.Popen("kill -TERM $(ps --ppid `cat app.pid` -o pid --no-header)", shell=True, cwd="plack")
+    subprocess.Popen("kill -TERM $(ps --ppid `cat app.pid` -o pid --no-header)", shell=True, cwd="plack", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 4 - 4
plain/setup.py

@@ -7,17 +7,17 @@ import os
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("plain/src/main/resources/application.conf", "127.0.0.1", args.database_host)
   setup_util.replace_text("plain/src/main/resources/application.conf", "127.0.0.1", args.database_host)
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.check_call("./sbt.bat assembly", shell=True, cwd="plain")
+    subprocess.check_call("./sbt.bat assembly", shell=True, cwd="plain", stderr=logfile, stdout=logfile)
   else:
   else:
-    subprocess.check_call("./sbt assembly", shell=True, cwd="plain")
+    subprocess.check_call("./sbt assembly", shell=True, cwd="plain", stderr=logfile, stdout=logfile)
      
      
-  subprocess.Popen("java -server -Xnoclassgc -XX:MaxPermSize=1g -XX:ReservedCodeCacheSize=384m -Xmx8g -Xss8m -Xmn4g -Xms6g -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -jar target/scala-2.10/plain-benchmark-assembly-1.0.1.jar", cwd="plain", shell=True)
+  subprocess.Popen("java -server -Xnoclassgc -XX:MaxPermSize=1g -XX:ReservedCodeCacheSize=384m -Xmx8g -Xss8m -Xmn4g -Xms6g -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -jar target/scala-2.10/plain-benchmark-assembly-1.0.1.jar", cwd="plain", shell=True, stderr=logfile, stdout=logfile)
   time.sleep(10)
   time.sleep(10)
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("taskkill /f /im *plain-benchmark* > NUL", shell=True)
+    subprocess.call("taskkill /f /im *plain-benchmark* > NUL", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 4 - 4
play-activate-mysql/setup.py

@@ -14,11 +14,11 @@ def start(args, logfile):
     ZipFile("./play-activate-mysql/target/universal/play-activate-mysql-1.0-SNAPSHOT.zip").extractall("./play-activate-mysql/target/universal")
     ZipFile("./play-activate-mysql/target/universal/play-activate-mysql-1.0-SNAPSHOT.zip").extractall("./play-activate-mysql/target/universal")
     with open("./play-activate-mysql/target/universal/play-activate-mysql-1.0-SNAPSHOT/bin/play-activate-mysql.bat", "w+") as f:
     with open("./play-activate-mysql/target/universal/play-activate-mysql-1.0-SNAPSHOT/bin/play-activate-mysql.bat", "w+") as f:
       f.write("java %1 -cp \"./lib/*;\" play.core.server.NettyServer .")
       f.write("java %1 -cp \"./lib/*;\" play.core.server.NettyServer .")
-    subprocess.Popen("play-activate-mysql.bat", shell=True, cwd="play-activate-mysql/target/universal/play-activate-mysql-1.0-SNAPSHOT/bin")
+    subprocess.Popen("play-activate-mysql.bat", shell=True, cwd="play-activate-mysql/target/universal/play-activate-mysql-1.0-SNAPSHOT/bin", stderr=logfile, stdout=logfile)
   else:
   else:
-    subprocess.check_call("unzip play-activate-mysql-1.0-SNAPSHOT.zip", shell=True, cwd="play-activate-mysql/target/universal")
-    subprocess.check_call("chmod +x play-activate-mysql", shell=True, cwd="play-activate-mysql/target/universal/play-activate-mysql-1.0-SNAPSHOT/bin")
-    subprocess.Popen("./play-activate-mysql", shell=True, cwd="play-activate-mysql/target/universal/play-activate-mysql-1.0-SNAPSHOT/bin")
+    subprocess.check_call("unzip play-activate-mysql-1.0-SNAPSHOT.zip", shell=True, cwd="play-activate-mysql/target/universal", stderr=logfile, stdout=logfile)
+    subprocess.check_call("chmod +x play-activate-mysql", shell=True, cwd="play-activate-mysql/target/universal/play-activate-mysql-1.0-SNAPSHOT/bin", stderr=logfile, stdout=logfile)
+    subprocess.Popen("./play-activate-mysql", shell=True, cwd="play-activate-mysql/target/universal/play-activate-mysql-1.0-SNAPSHOT/bin", stderr=logfile, stdout=logfile)
 
 
   return 0
   return 0
 def stop(logfile):
 def stop(logfile):

+ 2 - 2
play-java-jpa/setup.py

@@ -3,10 +3,10 @@ import subprocess
 
 
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("play-java-jpa/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   setup_util.replace_text("play-java-jpa/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
-  subprocess.Popen(["play","start"], stdin=subprocess.PIPE, cwd="play-java-jpa")
+  subprocess.Popen(["play","start"], stdin=subprocess.PIPE, cwd="play-java-jpa", stderr=logfile, stdout=logfile)
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):
-  p = subprocess.Popen(["play","stop"], cwd="play-java-jpa")
+  p = subprocess.Popen(["play","stop"], cwd="play-java-jpa", stderr=logfile, stdout=logfile)
   p.communicate()
   p.communicate()
   return 0
   return 0

+ 2 - 2
play-java/setup.py

@@ -3,10 +3,10 @@ import subprocess
 
 
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("play-java/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   setup_util.replace_text("play-java/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
-  subprocess.Popen(["play","start"], stdin=subprocess.PIPE, cwd="play-java")
+  subprocess.Popen(["play","start"], stdin=subprocess.PIPE, cwd="play-java", stderr=logfile, stdout=logfile)
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):
-  p = subprocess.Popen(["play","stop"], cwd="play-java")
+  p = subprocess.Popen(["play","stop"], cwd="play-java", stderr=logfile, stdout=logfile)
   p.communicate()
   p.communicate()
   return 0
   return 0

+ 5 - 5
play-scala-mongodb/setup.py

@@ -8,17 +8,17 @@ from zipfile import ZipFile
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("play-scala-mongodb/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   setup_util.replace_text("play-scala-mongodb/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
 
 
-  subprocess.check_call("play clean dist", shell=True, cwd="play-scala-mongodb")
+  subprocess.check_call("play clean dist", shell=True, cwd="play-scala-mongodb", stderr=logfile, stdout=logfile)
 
 
   if os.name == 'nt':
   if os.name == 'nt':
     ZipFile("./play-scala-mongodb/target/universal/play-scala-mongodb-1.0-SNAPSHOT.zip").extractall("./play-scala-mongodb/target/universal")
     ZipFile("./play-scala-mongodb/target/universal/play-scala-mongodb-1.0-SNAPSHOT.zip").extractall("./play-scala-mongodb/target/universal")
     with open("./play-scala-mongodb/target/universal/play-scala-mongodb-1.0-SNAPSHOT/bin/play-scala-mongodb.bat", "w+") as f:
     with open("./play-scala-mongodb/target/universal/play-scala-mongodb-1.0-SNAPSHOT/bin/play-scala-mongodb.bat", "w+") as f:
       f.write("java %1 -cp \"./lib/*;\" play.core.server.NettyServer .")
       f.write("java %1 -cp \"./lib/*;\" play.core.server.NettyServer .")
-    subprocess.Popen("play-scala-mongodb.bat", shell=True, cwd="play-scala-mongodb/target/universal/play-scala-mongodb-1.0-SNAPSHOT/bin")
+    subprocess.Popen("play-scala-mongodb.bat", shell=True, cwd="play-scala-mongodb/target/universal/play-scala-mongodb-1.0-SNAPSHOT/bin", stderr=logfile, stdout=logfile)
   else:
   else:
-    subprocess.check_call("unzip play-scala-mongodb-1.0-SNAPSHOT.zip", shell=True, cwd="play-scala-mongodb/target/universal")
-    subprocess.check_call("chmod +x play-scala-mongodb", shell=True, cwd="play-scala-mongodb/target/universal/play-scala-mongodb-1.0-SNAPSHOT/bin")
-    subprocess.Popen("./play-scala-mongodb", shell=True, cwd="play-scala-mongodb/target/universal/play-scala-mongodb-1.0-SNAPSHOT/bin")
+    subprocess.check_call("unzip play-scala-mongodb-1.0-SNAPSHOT.zip", shell=True, cwd="play-scala-mongodb/target/universal", stderr=logfile, stdout=logfile)
+    subprocess.check_call("chmod +x play-scala-mongodb", shell=True, cwd="play-scala-mongodb/target/universal/play-scala-mongodb-1.0-SNAPSHOT/bin", stderr=logfile, stdout=logfile)
+    subprocess.Popen("./play-scala-mongodb", shell=True, cwd="play-scala-mongodb/target/universal/play-scala-mongodb-1.0-SNAPSHOT/bin", stderr=logfile, stdout=logfile)
 
 
   return 0
   return 0
 def stop(logfile):
 def stop(logfile):

+ 1 - 1
play-scala/setup.py

@@ -12,7 +12,7 @@ def start(args, logfile):
     play_cmd = "play.bat"
     play_cmd = "play.bat"
   
   
   setup_util.replace_text("play-scala/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   setup_util.replace_text("play-scala/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
-  subprocess.Popen([play_cmd,"start"], stdin=subprocess.PIPE, cwd="play-scala")
+  subprocess.Popen([play_cmd,"start"], stdin=subprocess.PIPE, cwd="play-scala", stderr=logfile, stdout=logfile)
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 5 - 5
play-slick/setup.py

@@ -8,17 +8,17 @@ from zipfile import ZipFile
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("play-slick/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   setup_util.replace_text("play-slick/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
 
 
-  subprocess.check_call("play clean dist", shell=True, cwd="play-slick")
+  subprocess.check_call("play clean dist", shell=True, cwd="play-slick", stderr=logfile, stdout=logfile)
 
 
   if os.name == 'nt':
   if os.name == 'nt':
     ZipFile("./play-slick/target/universal/play-slick-1.0-SNAPSHOT.zip").extractall("./play-slick/target/universal")
     ZipFile("./play-slick/target/universal/play-slick-1.0-SNAPSHOT.zip").extractall("./play-slick/target/universal")
     with open("./play-slick/target/universal/play-slick-1.0-SNAPSHOT/bin/play-slick.bat", "w+") as f:
     with open("./play-slick/target/universal/play-slick-1.0-SNAPSHOT/bin/play-slick.bat", "w+") as f:
       f.write("java %1 -cp \"./lib/*;\" play.core.server.NettyServer .")
       f.write("java %1 -cp \"./lib/*;\" play.core.server.NettyServer .")
-    subprocess.Popen("play-slick.bat", shell=True, cwd="play-slick/target/universal/play-slick-1.0-SNAPSHOT/bin")
+    subprocess.Popen("play-slick.bat", shell=True, cwd="play-slick/target/universal/play-slick-1.0-SNAPSHOT/bin", stderr=logfile, stdout=logfile)
   else:
   else:
-    subprocess.check_call("unzip play-slick-1.0-SNAPSHOT.zip", shell=True, cwd="play-slick/target/universal")
-    subprocess.check_call("chmod +x play-slick", shell=True, cwd="play-slick/target/universal/play-slick-1.0-SNAPSHOT/bin")
-    subprocess.Popen("./play-slick", shell=True, cwd="play-slick/target/universal/play-slick-1.0-SNAPSHOT/bin")
+    subprocess.check_call("unzip play-slick-1.0-SNAPSHOT.zip", shell=True, cwd="play-slick/target/universal", stderr=logfile, stdout=logfile)
+    subprocess.check_call("chmod +x play-slick", shell=True, cwd="play-slick/target/universal/play-slick-1.0-SNAPSHOT/bin", stderr=logfile, stdout=logfile)
+    subprocess.Popen("./play-slick", shell=True, cwd="play-slick/target/universal/play-slick-1.0-SNAPSHOT/bin", stderr=logfile, stdout=logfile)
 
 
   return 0
   return 0
 def stop(logfile):
 def stop(logfile):

+ 2 - 2
play1/setup.py

@@ -4,14 +4,14 @@ import setup_util
 
 
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("play1/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   setup_util.replace_text("play1/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
-  subprocess.check_call("play1 start --%prod", shell=True, cwd="play1")
+  subprocess.check_call("play1 start --%prod", shell=True, cwd="play1", stderr=logfile, stdout=logfile)
 #  subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
 #  subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
 #  subprocess.check_call("play1 war -o $RESIN_HOME/webapps/play1 --exclude benchmark_config", shell=True, cwd="play1")
 #  subprocess.check_call("play1 war -o $RESIN_HOME/webapps/play1 --exclude benchmark_config", shell=True, cwd="play1")
 #  subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
 #  subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
   return 0
   return 0
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.check_call("play1 stop", shell=True, cwd="play1")
+    subprocess.check_call("play1 stop", shell=True, cwd="play1", stderr=logfile, stdout=logfile)
 #    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
 #    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
 #    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
 #    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
     return 0
     return 0

+ 5 - 5
play1siena/setup.py

@@ -7,15 +7,15 @@ import os
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("play1siena/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   setup_util.replace_text("play1siena/conf/application.conf", "jdbc:mysql:\/\/.*:3306", "jdbc:mysql://" + args.database_host + ":3306")
   
   
-  subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-  subprocess.check_call("play1 war -o $RESIN_HOME/webapps/play1 --exclude benchmark_config", shell=True, cwd="play1siena")
-  subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+  subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=logfile, stdout=logfile)
+  subprocess.check_call("play1 war -o $RESIN_HOME/webapps/play1 --exclude benchmark_config", shell=True, cwd="play1siena", stderr=logfile, stdout=logfile)
+  subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=logfile, stdout=logfile)
 
 
   return 0
   return 0
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 10 - 10
rack/setup_jruby.py

@@ -6,21 +6,21 @@ import re
 def start(args, logfile):
 def start(args, logfile):
 
 
   try:
   try:
-    subprocess.check_call("rvm jruby-1.7.4 do bundle install --gemfile=Gemfile-jruby", shell=True, cwd="rack")
-    subprocess.check_call("cp Gemfile-jruby Gemfile", shell=True, cwd="rack")
-    subprocess.check_call("cp Gemfile-jruby.lock Gemfile.lock", shell=True, cwd="rack")
-    subprocess.check_call("rvm jruby-1.7.4 do warble war", shell=True, cwd="rack")
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-    subprocess.check_call("cp rack.war $RESIN_HOME/webapps/rack.war", shell=True, cwd="rack")
-    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+    subprocess.check_call("rvm jruby-1.7.4 do bundle install --gemfile=Gemfile-jruby", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-jruby Gemfile", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-jruby.lock Gemfile.lock", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rvm jruby-1.7.4 do warble war", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp rack.war $RESIN_HOME/webapps/rack.war", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
-    subprocess.check_call("rm Gemfile", shell=True, cwd="rack")
-    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rack")
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm Gemfile", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 8
rack/setup_ruby.py

@@ -11,16 +11,16 @@ home = expanduser("~")
 def start(args, logfile):
 def start(args, logfile):
 
 
   try:
   try:
-    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle install --gemfile=Gemfile-ruby", shell=True, cwd="rack")
-    subprocess.check_call("cp Gemfile-ruby Gemfile", shell=True, cwd="rack")
-    subprocess.check_call("cp Gemfile-ruby.lock Gemfile.lock", shell=True, cwd="rack")
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/rack/config/nginx.conf", shell=True)
-    subprocess.Popen("rvm ruby-2.0.0-p0 do bundle exec unicorn -E production -c config/unicorn.rb", shell=True, cwd="rack")
+    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle install --gemfile=Gemfile-ruby", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-ruby Gemfile", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-ruby.lock Gemfile.lock", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/rack/config/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.Popen("rvm ruby-2.0.0-p0 do bundle exec unicorn -E production -c config/unicorn.rb", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
-  subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
+  subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
   try:
   try:
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()
@@ -29,8 +29,8 @@ def stop(logfile):
         pid = int(line.split(None, 2)[1])
         pid = int(line.split(None, 2)[1])
         os.kill(pid, 9)
         os.kill(pid, 9)
     # subprocess.check_call("rvm ruby-2.0.0-p0 do bundle exec passenger stop --pid-file=$HOME/FrameworkBenchmarks/rack/rack.pid", shell=True, cwd='rack')
     # subprocess.check_call("rvm ruby-2.0.0-p0 do bundle exec passenger stop --pid-file=$HOME/FrameworkBenchmarks/rack/rack.pid", shell=True, cwd='rack')
-    subprocess.check_call("rm Gemfile", shell=True, cwd="rack")
-    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rack")
+    subprocess.check_call("rm Gemfile", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rack", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 1 - 1
racket-ws/setup.py

@@ -7,7 +7,7 @@ import os
 def start(args, logfile):
 def start(args, logfile):
   db_host = args.database_host
   db_host = args.database_host
   threads = str(args.max_threads)
   threads = str(args.max_threads)
-  subprocess.Popen("racket -t bench.rkt -- " + db_host + " > /dev/null", shell=True, cwd="racket-ws/bench")
+  subprocess.Popen("racket -t bench.rkt -- " + db_host + " > /dev/null", shell=True, cwd="racket-ws/bench", stderr=logfile, stdout=logfile)
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):

+ 11 - 11
rails-stripped/setup_jruby.py

@@ -8,22 +8,22 @@ def start(args, logfile):
   setup_util.replace_text("rails-stripped/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
   setup_util.replace_text("rails-stripped/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
 
 
   try:
   try:
-    subprocess.check_call("rvm jruby-1.7.4 do bundle install --gemfile=Gemfile-jruby", shell=True, cwd="rails-stripped")
-    subprocess.check_call("cp Gemfile-jruby Gemfile", shell=True, cwd="rails-stripped")
-    subprocess.check_call("cp Gemfile-jruby.lock Gemfile.lock", shell=True, cwd="rails-stripped")
-    subprocess.check_call("cp config/database-jruby.yml config/database.yml", shell=True, cwd="rails-stripped")
-    subprocess.check_call("rvm jruby-1.7.4 do warble war", shell=True, cwd="rails-stripped")
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-    subprocess.check_call("cp rails-stripped.war $RESIN_HOME/webapps/rails.war", shell=True, cwd="rails-stripped")
-    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+    subprocess.check_call("rvm jruby-1.7.4 do bundle install --gemfile=Gemfile-jruby", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-jruby Gemfile", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-jruby.lock Gemfile.lock", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp config/database-jruby.yml config/database.yml", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rvm jruby-1.7.4 do warble war", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp rails-stripped.war $RESIN_HOME/webapps/rails.war", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
-    subprocess.check_call("rm Gemfile", shell=True, cwd="rails-stripped")
-    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rails-stripped")
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm Gemfile", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 9 - 9
rails-stripped/setup_ruby.py

@@ -11,17 +11,17 @@ home = expanduser("~")
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("rails-stripped/config/database-ruby.yml", "host: .*", "host: " + args.database_host)
   setup_util.replace_text("rails-stripped/config/database-ruby.yml", "host: .*", "host: " + args.database_host)
   try:
   try:
-    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle install --gemfile=Gemfile-ruby", shell=True, cwd="rails-stripped")
-    subprocess.check_call("cp Gemfile-ruby Gemfile", shell=True, cwd="rails-stripped")
-    subprocess.check_call("cp Gemfile-ruby.lock Gemfile.lock", shell=True, cwd="rails-stripped")
-    subprocess.check_call("cp config/database-ruby.yml config/database.yml", shell=True, cwd="rails-stripped")
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/rails-stripped/config/nginx.conf", shell=True)
-    subprocess.Popen("rvm ruby-2.0.0-p0 do bundle exec unicorn_rails -E production -c config/unicorn.rb", shell=True, cwd="rails-stripped")
+    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle install --gemfile=Gemfile-ruby", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-ruby Gemfile", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-ruby.lock Gemfile.lock", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp config/database-ruby.yml config/database.yml", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/rails-stripped/config/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.Popen("rvm ruby-2.0.0-p0 do bundle exec unicorn_rails -E production -c config/unicorn.rb", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
-  subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
+  subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
   try:
   try:
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()
@@ -30,8 +30,8 @@ def stop(logfile):
         pid = int(line.split(None, 2)[1])
         pid = int(line.split(None, 2)[1])
         os.kill(pid, 9)
         os.kill(pid, 9)
     # subprocess.check_call("rvm ruby-2.0.0-p0 do bundle exec passenger stop --pid-file=$HOME/FrameworkBenchmarks/rack/rack.pid", shell=True, cwd='rack')
     # subprocess.check_call("rvm ruby-2.0.0-p0 do bundle exec passenger stop --pid-file=$HOME/FrameworkBenchmarks/rack/rack.pid", shell=True, cwd='rack')
-    subprocess.check_call("rm Gemfile", shell=True, cwd="rails-stripped")
-    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rails-stripped")
+    subprocess.check_call("rm Gemfile", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rails-stripped", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 11 - 11
rails/setup_jruby.py

@@ -8,22 +8,22 @@ def start(args, logfile):
   setup_util.replace_text("rails/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
   setup_util.replace_text("rails/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
 
 
   try:
   try:
-    subprocess.check_call("rvm jruby-1.7.4 do bundle install --gemfile=Gemfile-jruby", shell=True, cwd="rails")
-    subprocess.check_call("cp Gemfile-jruby Gemfile", shell=True, cwd="rails")
-    subprocess.check_call("cp Gemfile-jruby.lock Gemfile.lock", shell=True, cwd="rails")
-    subprocess.check_call("cp config/database-jruby.yml config/database.yml", shell=True, cwd="rails")
-    subprocess.check_call("rvm jruby-1.7.4 do warble war", shell=True, cwd="rails")
-    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-    subprocess.check_call("cp rails.war $RESIN_HOME/webapps/rails.war", shell=True, cwd="rails")
-    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+    subprocess.check_call("rvm jruby-1.7.4 do bundle install --gemfile=Gemfile-jruby", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-jruby Gemfile", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-jruby.lock Gemfile.lock", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp config/database-jruby.yml config/database.yml", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rvm jruby-1.7.4 do warble war", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp rails.war $RESIN_HOME/webapps/rails.war", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
-    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
-    subprocess.check_call("rm Gemfile", shell=True, cwd="rails")
-    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rails")
+    subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm Gemfile", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 7 - 7
rails/setup_ruby.py

@@ -11,17 +11,17 @@ home = expanduser("~")
 def start(args, logfile):
 def start(args, logfile):
   setup_util.replace_text("rails/config/database-ruby.yml", "host: .*", "host: " + args.database_host)
   setup_util.replace_text("rails/config/database-ruby.yml", "host: .*", "host: " + args.database_host)
   try:
   try:
-    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle install --gemfile=Gemfile-ruby", shell=True, cwd="rails")
-    subprocess.check_call("cp Gemfile-ruby Gemfile", shell=True, cwd="rails")
-    subprocess.check_call("cp Gemfile-ruby.lock Gemfile.lock", shell=True, cwd="rails")
-    subprocess.check_call("cp config/database-ruby.yml config/database.yml", shell=True, cwd="rails")
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/rails/config/nginx.conf", shell=True)
-    subprocess.Popen("rvm ruby-2.0.0-p0 do bundle exec unicorn_rails -E production -c config/unicorn.rb", shell=True, cwd="rails")
+    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle install --gemfile=Gemfile-ruby", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-ruby Gemfile", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp Gemfile-ruby.lock Gemfile.lock", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("cp config/database-ruby.yml config/database.yml", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/rails/config/nginx.conf", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.Popen("rvm ruby-2.0.0-p0 do bundle exec unicorn_rails -E production -c config/unicorn.rb", shell=True, cwd="rails", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
-  subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
+  subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=logfile, stdout=logfile)
   try:
   try:
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
     out, err = p.communicate()
     out, err = p.communicate()

+ 4 - 4
restexpress/setup.py

@@ -9,10 +9,10 @@ def start(args, logfile):
   setup_util.replace_text("restexpress/config/dev/environment.properties", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
   setup_util.replace_text("restexpress/config/dev/environment.properties", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
 
 
   try:
   try:
-    subprocess.check_call("mvn clean package", shell=True, cwd="restexpress")
-    subprocess.check_call("mvn assembly:single", shell=True, cwd="restexpress")
-    subprocess.check_call("unzip world-1.0-SNAPSHOT-zip-with-dependencies.zip", shell=True, cwd="restexpress/target")
-    subprocess.Popen("java -jar world-1.0-SNAPSHOT.jar".rsplit(" "), cwd="restexpress/target/world-1.0-SNAPSHOT")
+    subprocess.check_call("mvn clean package", shell=True, cwd="restexpress", stderr=logfile, stdout=logfile)
+    subprocess.check_call("mvn assembly:single", shell=True, cwd="restexpress", stderr=logfile, stdout=logfile)
+    subprocess.check_call("unzip world-1.0-SNAPSHOT-zip-with-dependencies.zip", shell=True, cwd="restexpress/target", stderr=logfile, stdout=logfile)
+    subprocess.Popen("java -jar world-1.0-SNAPSHOT.jar".rsplit(" "), cwd="restexpress/target/world-1.0-SNAPSHOT", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 8 - 8
revel-jet/setup.py

@@ -11,19 +11,19 @@ def start(args, logfile):
   if os.name == 'nt':
   if os.name == 'nt':
     env = os.environ.copy()
     env = os.environ.copy()
     env["GOPATH"] = "C:\\FrameworkBenchmarks\\" + CWD
     env["GOPATH"] = "C:\\FrameworkBenchmarks\\" + CWD
-    subprocess.call("go get -u github.com/robfig/revel/revel github.com/eaigner/jet", shell=True, cwd=CWD, env=env)
-    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env)
-    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd=CWD, env=env)
+    subprocess.call("go get -u github.com/robfig/revel/revel github.com/eaigner/jet", shell=True, cwd=CWD, env=env, stderr=logfile, stdout=logfile)
+    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env, stderr=logfile, stdout=logfile)
+    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd=CWD, env=env, stderr=logfile, stdout=logfile)
     return 0
     return 0
-  subprocess.call("go get -u github.com/robfig/revel/revel github.com/eaigner/jet", shell=True, cwd=CWD)
-  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd=CWD)
-  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd=CWD)
+  subprocess.call("go get -u github.com/robfig/revel/revel github.com/eaigner/jet", shell=True, cwd=CWD, stderr=logfile, stdout=logfile)
+  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd=CWD, stderr=logfile, stdout=logfile)
+  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd=CWD, stderr=logfile, stdout=logfile)
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("taskkill /f /im benchmark.exe > NUL", shell=True)
-    subprocess.call("taskkill /f /im revel.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im benchmark.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("taskkill /f /im revel.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 8 - 8
revel-qbs/setup.py

@@ -11,19 +11,19 @@ def start(args, logfile):
   if os.name == 'nt':
   if os.name == 'nt':
     env = os.environ.copy()
     env = os.environ.copy()
     env["GOPATH"] = "C:\\FrameworkBenchmarks\\" + CWD
     env["GOPATH"] = "C:\\FrameworkBenchmarks\\" + CWD
-    subprocess.call("go get -u github.com/robfig/revel/revel github.com/coocood/qbs", shell=True, cwd=CWD, env=env)
-    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env)
-    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd=CWD, env=env)
+    subprocess.call("go get -u github.com/robfig/revel/revel github.com/coocood/qbs", shell=True, cwd=CWD, env=env, stderr=logfile, stdout=logfile)
+    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd=CWD, env=env, stderr=logfile, stdout=logfile)
+    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd=CWD, env=env, stderr=logfile, stdout=logfile)
     return 0
     return 0
-  subprocess.call("go get -u github.com/robfig/revel/revel github.com/coocood/qbs", shell=True, cwd=CWD)
-  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd=CWD)
-  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd=CWD)
+  subprocess.call("go get -u github.com/robfig/revel/revel github.com/coocood/qbs", shell=True, cwd=CWD, stderr=logfile, stdout=logfile)
+  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd=CWD, stderr=logfile, stdout=logfile)
+  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd=CWD, stderr=logfile, stdout=logfile)
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("taskkill /f /im benchmark.exe > NUL", shell=True)
-    subprocess.call("taskkill /f /im revel.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im benchmark.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("taskkill /f /im revel.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 8 - 8
revel/setup.py

@@ -9,19 +9,19 @@ def start(args, logfile):
   if os.name == 'nt':
   if os.name == 'nt':
     env = os.environ.copy()
     env = os.environ.copy()
     env["GOPATH"] = r"C:\FrameworkBenchmarks\revel"
     env["GOPATH"] = r"C:\FrameworkBenchmarks\revel"
-    subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel", env=env)
-    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd="revel", env=env)
-    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd="revel", env=env)
+    subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel", env=env, stderr=logfile, stdout=logfile)
+    subprocess.call(r"go build -o bin\revel.exe github.com/robfig/revel/revel", shell=True, cwd="revel", env=env, stderr=logfile, stdout=logfile)
+    subprocess.Popen(r"bin\revel.exe run benchmark prod".rsplit(" "), shell=True, cwd="revel", env=env, stderr=logfile, stdout=logfile)
     return 0
     return 0
-  subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel", stderr=logfile, stdout=logfile)
-  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd="revel", stderr=logfile, stdout=logfile)
-  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd="revel", stderr=logfile, stdout=logfile)
+  subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel", stderr=logfile, stdout=logfile, stderr=logfile, stdout=logfile)
+  subprocess.call("go build -o bin/revel github.com/robfig/revel/revel", shell=True, cwd="revel", stderr=logfile, stdout=logfile, stderr=logfile, stdout=logfile)
+  subprocess.Popen("bin/revel run benchmark prod".rsplit(" "), cwd="revel", stderr=logfile, stdout=logfile, stderr=logfile, stdout=logfile)
   return 0
   return 0
 
 
 def stop(logfile):
 def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
-    subprocess.call("taskkill /f /im benchmark.exe > NUL", shell=True)
-    subprocess.call("taskkill /f /im revel.exe > NUL", shell=True)
+    subprocess.call("taskkill /f /im benchmark.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.call("taskkill /f /im revel.exe > NUL", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()

+ 8 - 8
ringojs-convenient/setup.py

@@ -9,15 +9,15 @@ def start(args, logfile):
 
 
   try:
   try:
 
 
-    subprocess.check_call("sudo rm -rf /usr/share/ringojs/packages/*", shell=True)
-    subprocess.check_call("sudo ringo-admin install oberhamsi/sql-ringojs-client", shell=True)
-    subprocess.check_call("sudo ringo-admin install grob/ringo-sqlstore", shell=True)
-    subprocess.check_call("sudo ringo-admin install ringo/stick", shell=True)
-    subprocess.check_call("sudo ringo-admin install oberhamsi/reinhardt", shell=True)
+    subprocess.check_call("sudo rm -rf /usr/share/ringojs/packages/*", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo ringo-admin install oberhamsi/sql-ringojs-client", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo ringo-admin install grob/ringo-sqlstore", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo ringo-admin install ringo/stick", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo ringo-admin install oberhamsi/reinhardt", shell=True, stderr=logfile, stdout=logfile)
 
 
-    subprocess.check_call("sudo mkdir -p /usr/share/ringojs/packages/ringo-sqlstore/jars/", shell=True)
-    subprocess.check_call("sudo cp /usr/share/ringojs//packages/sql-ringojs-client/jars/mysql.jar /usr/share/ringojs/packages/ringo-sqlstore/jars/", shell=True)
-    subprocess.Popen("ringo --production -Dserver -DXmx=512m -DXms=512m ringo-main.js", shell=True, cwd="ringojs-convenient")
+    subprocess.check_call("sudo mkdir -p /usr/share/ringojs/packages/ringo-sqlstore/jars/", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo cp /usr/share/ringojs//packages/sql-ringojs-client/jars/mysql.jar /usr/share/ringojs/packages/ringo-sqlstore/jars/", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.Popen("ringo --production -Dserver -DXmx=512m -DXms=512m ringo-main.js", shell=True, cwd="ringojs-convenient", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 3 - 3
ringojs/setup.py

@@ -8,9 +8,9 @@ def start(args, logfile):
   setup_util.replace_text("ringojs/ringo-main.js", "dbHost = '.*';", "dbHost = '" + args.database_host + "';")
   setup_util.replace_text("ringojs/ringo-main.js", "dbHost = '.*';", "dbHost = '" + args.database_host + "';")
 
 
   try:
   try:
-    subprocess.check_call("sudo rm -rf /usr/share/ringojs/packages/*", shell=True)
-    subprocess.check_call("sudo ringo-admin install oberhamsi/sql-ringojs-client", shell=True)
-    subprocess.Popen("ringo --production -Dserver -DXmx=512m -DXms=512m ringo-main.js", shell=True, cwd="ringojs")
+    subprocess.check_call("sudo rm -rf /usr/share/ringojs/packages/*", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.check_call("sudo ringo-admin install oberhamsi/sql-ringojs-client", shell=True, stderr=logfile, stdout=logfile)
+    subprocess.Popen("ringo --production -Dserver -DXmx=512m -DXms=512m ringo-main.js", shell=True, cwd="ringojs", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 11 - 11
scalatra/setup.py

@@ -10,28 +10,28 @@ def start(args, logfile):
 
 
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('"..\\sbt\\sbt.bat" clean package', shell=True, cwd="scalatra")
-      subprocess.check_call('rmdir /S /Q "%RESIN_HOME%\\webapps\\"', shell=True)
-      subprocess.check_call('mkdir "%RESIN_HOME%\\webapps\\"', shell=True)
+      subprocess.check_call('"..\\sbt\\sbt.bat" clean package', shell=True, cwd="scalatra", stderr=logfile, stdout=logfile)
+      subprocess.check_call('rmdir /S /Q "%RESIN_HOME%\\webapps\\"', shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('mkdir "%RESIN_HOME%\\webapps\\"', shell=True, stderr=logfile, stdout=logfile)
       
       
       # 'copy' on windows doesn't like the wildcard war file selector
       # 'copy' on windows doesn't like the wildcard war file selector
       warFile = glob.glob("scalatra\\target\\scala-2.10\\scalatra*.war")[0]
       warFile = glob.glob("scalatra\\target\\scala-2.10\\scalatra*.war")[0]
-      subprocess.check_call('copy "{0}" "%RESIN_HOME%\\webapps\\scalatra.war"'.format(warFile), shell=True)
-      subprocess.check_call('"%RESIN_HOME%\\bin\\start.bat"', shell=True)
+      subprocess.check_call('copy "{0}" "%RESIN_HOME%\\webapps\\scalatra.war"'.format(warFile), shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call('"%RESIN_HOME%\\bin\\start.bat"', shell=True, stderr=logfile, stdout=logfile)
     else:
     else:
-      subprocess.check_call("../sbt/sbt clean package", shell=True, cwd="scalatra")
-      subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-      subprocess.check_call("cp scalatra/target/scala-2.10/scalatra*.war $RESIN_HOME/webapps/scalatra.war", shell=True)
-      subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
+      subprocess.check_call("../sbt/sbt clean package", shell=True, cwd="scalatra", stderr=logfile, stdout=logfile)
+      subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call("cp scalatra/target/scala-2.10/scalatra*.war $RESIN_HOME/webapps/scalatra.war", shell=True, stderr=logfile, stdout=logfile)
+      subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
 def stop(logfile):
 def stop(logfile):
   try:
   try:
     if os.name == 'nt':
     if os.name == 'nt':
-      subprocess.check_call('"%RESIN_HOME%\\bin\\stop.bat"', shell=True)
+      subprocess.check_call('"%RESIN_HOME%\\bin\\stop.bat"', shell=True, stderr=logfile, stdout=logfile)
     else:
     else:
-      subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
+      subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1

+ 2 - 2
servicestack/setup_iis.py

@@ -9,7 +9,7 @@ def start(args, logfile):
   
   
   try:
   try:
     setup_util.replace_text("servicestack/src/Web.config", "localhost", args.database_host)
     setup_util.replace_text("servicestack/src/Web.config", "localhost", args.database_host)
-    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="servicestack")
+    subprocess.check_call("powershell -Command .\\setup_iis.ps1 start", cwd="servicestack", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -18,5 +18,5 @@ def stop(logfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="servicestack")
+  subprocess.check_call("powershell -Command .\\setup_iis.ps1 stop", cwd="servicestack", stderr=logfile, stdout=logfile)
   return 0
   return 0

+ 8 - 8
servicestack/setup_nginx.py

@@ -14,17 +14,17 @@ def start(args, logfile):
 
 
   try:
   try:
     # build
     # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app)
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=logfile, stdout=logfile)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=logfile, stdout=logfile)
     
     
     # nginx
     # nginx
     workers = 'worker_processes ' + str(args.max_threads) + ';'
     workers = 'worker_processes ' + str(args.max_threads) + ';'
-    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True);
-    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True)
+    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True, stderr=logfile, stdout=logfile);
+    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True, stderr=logfile, stdout=logfile)
     
     
     # fastcgi
     # fastcgi
     for port in range(9001, 9001 + args.max_threads):
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
+      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app, stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -33,7 +33,7 @@ def stop(logfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True)
-  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
-  subprocess.check_call("pkill -9 mono", shell=True)
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=logfile, stdout=logfile)
+  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True, stderr=logfile, stdout=logfile)
+  subprocess.check_call("pkill -9 mono", shell=True, stderr=logfile, stdout=logfile)
   return 0
   return 0

+ 2 - 2
servicestack/setup_self.py

@@ -9,7 +9,7 @@ def start(args, logfile):
   
   
   try:
   try:
     setup_util.replace_text("servicestack/svc/SelfHost/App.config", "localhost", args.database_host)
     setup_util.replace_text("servicestack/svc/SelfHost/App.config", "localhost", args.database_host)
-    subprocess.check_call("powershell -Command .\\setup_self.ps1 start", cwd="servicestack")
+    subprocess.check_call("powershell -Command .\\setup_self.ps1 start", cwd="servicestack", stderr=logfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1
@@ -18,5 +18,5 @@ def stop(logfile):
   if os.name != 'nt':
   if os.name != 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("powershell -Command .\\setup_self.ps1 stop", cwd="servicestack")
+  subprocess.check_call("powershell -Command .\\setup_self.ps1 stop", cwd="servicestack", stderr=logfile, stdout=logfile)
   return 0
   return 0

Some files were not shown because too many files changed in this diff