summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-24 04:47:48 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-24 04:47:48 +0000
commit0695a5aa253886a91830e33a6684c857f72dbea9 (patch)
tree1929b605e9bf3b88050d97d3aaa3e875f01ad951 /lib
parentcc61e92148b6fc6b981b476095e1d43d5c4335cf (diff)
* common.mk: Use $RUNRUBY for worker process.
* lib/test/unit.rb: Fix bug. * lib/test/unit.rb: @options[:ruby](@opts[:ruby]) is now Array. * test/testunit/parallel.rb: Fix for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/test/unit.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index 52e67b97ac..dee7e3cb74 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -101,7 +101,7 @@ module Test
end
opts.on '--ruby VAL', "Path to ruby; It'll have used at -j option" do |a|
- options[:ruby] = a
+ options[:ruby] = a.split(/ /).reject(&:empty?)
end
end
@@ -364,8 +364,9 @@ module Test
i,o = IO.pipe("ASCII-8BIT") # worker o>|i> master
j,k = IO.pipe("ASCII-8BIT") # worker <j|<k master
k.sync = true
- pid = spawn(*@opts[:ruby].split(/ /),File.dirname(__FILE__) +
- "/unit/parallel.rb", *@args, out: o, in: j)
+ pid = spawn(*@opts[:ruby],
+ "#{File.dirname(__FILE__)}/unit/parallel.rb",
+ *@args, out: o, in: j)
[o,j].each{|io| io.close }
{in: k, out: i, pid: pid, status: :waiting}
end