From: <jh...@us...> - 2011-05-05 00:27:51
|
Revision: 285 http://etch.svn.sourceforge.net/etch/?rev=285&view=rev Author: jheiss Date: 2011-05-05 00:27:45 +0000 (Thu, 05 May 2011) Log Message: ----------- Ensure that the client and server are invoked with the same ruby the user used to invoke the test suite. This allows us to test etch under various ruby versions, etc. Update to reflect client directory structure changes Modified Paths: -------------- trunk/test/test_options.rb trunk/test/test_outputcapture.rb Modified: trunk/test/test_options.rb =================================================================== --- trunk/test/test_options.rb 2011-05-04 22:22:48 UTC (rev 284) +++ trunk/test/test_options.rb 2011-05-05 00:27:45 UTC (rev 285) @@ -105,7 +105,7 @@ def test_help output = nil - IO.popen("ruby #{CLIENTDIR}/etch --help") do |pipe| + IO.popen("#{RUBY} #{CLIENTDIR}/bin/etch --help") do |pipe| output = pipe.readlines end # Make sure at least something resembling help output is there @@ -529,7 +529,7 @@ # Test that output from etch is appropriate #run_etch(@server, @testroot, :extra_args => '--list-files', :testname => testname) - output = `ruby #{CLIENTDIR}/etch --generate-all --test-root=#{@testroot} --key=#{File.dirname(__FILE__)}/keys/testkey --server=http://localhost:#{@server[:port]} --list-files` + output = `#{RUBY} #{CLIENTDIR}/bin/etch --generate-all --test-root=#{@testroot} --key=#{File.dirname(__FILE__)}/keys/testkey --server=http://localhost:#{@server[:port]} --list-files` assert(output.include?("Files under management:\n#{@targetfile}\n")) # Ensure that the target file wasn't touched Modified: trunk/test/test_outputcapture.rb =================================================================== --- trunk/test/test_outputcapture.rb 2011-05-04 22:22:48 UTC (rev 284) +++ trunk/test/test_outputcapture.rb 2011-05-05 00:27:45 UTC (rev 285) @@ -6,9 +6,9 @@ require "./#{File.dirname(__FILE__)}/etchtest" require 'timeout' -$: << EtchTests::CLIENTDIR +$: << File.join(EtchTests::CLIENTDIR, 'lib') $: << File.join(EtchTests::SERVERDIR, 'lib') -require 'etchclient' +require 'etch/client' class EtchOutputCaptureTests < Test::Unit::TestCase include EtchTests @@ -86,7 +86,7 @@ </source> </file> <post> - <exec>ruby -e 'sleep #{Etch::Client::OUTPUT_CAPTURE_TIMEOUT + 30}' &</exec> + <exec>#{RUBY} -e 'sleep #{Etch::Client::OUTPUT_CAPTURE_TIMEOUT + 30}' &</exec> </post> </config> EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |