From: <jh...@us...> - 2009-09-23 17:57:07
|
Revision: 102 http://etch.svn.sourceforge.net/etch/?rev=102&view=rev Author: jheiss Date: 2009-09-23 17:56:52 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Use unicorn or script/server for testing based on a constant. Modified Paths: -------------- trunk/test/etchtest.rb Modified: trunk/test/etchtest.rb =================================================================== --- trunk/test/etchtest.rb 2009-09-23 01:07:42 UTC (rev 101) +++ trunk/test/etchtest.rb 2009-09-23 17:56:52 UTC (rev 102) @@ -45,6 +45,7 @@ FileUtils.rm_rf(repodir) end + UNICORN = false def start_server(repodir) ENV['etchserverbase'] = repodir # Pick a random port in the 3001-6000 range (range somewhat randomly chosen) @@ -54,13 +55,11 @@ sleep(5) else Dir.chdir('../server') - # FIXME: silence the server (see various failed attempts...) - # Causes ruby to fork, so we're left with a useless pid - #exec("./script/server -d -p #{port}") - # Causes ruby to invoke a copy of sh to run the command (to handle - # the redirect), which gets in the way of killing things - #exec("./script/server -p #{port} > /dev/null") - exec("./script/server -p #{port}") + if UNICORN + exec("unicorn_rails -p #{port}") + else + exec("./script/server -p #{port}") + end end [port, pid] end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |