mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
cc61e92148
commit
0695a5aa25
4 changed files with 14 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Thu Feb 24 13:39:25 2011 Shota Fukumori (sora_h) <sorah@tubusu.net>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Thu Feb 24 10:05:55 2011 Shota Fukumori (sora_h) <sorah@tubusu.net>
|
Thu Feb 24 10:05:55 2011 Shota Fukumori (sora_h) <sorah@tubusu.net>
|
||||||
|
|
||||||
* test/testunit/tests_for_parallel/misc.rb: Fix bug in r30947.
|
* test/testunit/tests_for_parallel/misc.rb: Fix bug in r30947.
|
||||||
|
|
|
@ -471,7 +471,7 @@ test: test-sample btest-ruby test-knownbug
|
||||||
|
|
||||||
test-all: $(TEST_RUNNABLE)-test-all
|
test-all: $(TEST_RUNNABLE)-test-all
|
||||||
yes-test-all: PHONY
|
yes-test-all: PHONY
|
||||||
$(RUNRUBY) "$(srcdir)/test/runner.rb" $(TESTS)
|
$(RUNRUBY) "$(srcdir)/test/runner.rb" --ruby="$(RUNRUBY)" $(TESTS)
|
||||||
TESTS_BUILD = mkmf
|
TESTS_BUILD = mkmf
|
||||||
no-test-all: PHONY
|
no-test-all: PHONY
|
||||||
$(MINIRUBY) -I"$(srcdir)/lib" "$(srcdir)/test/runner.rb" $(TESTS_BUILD)
|
$(MINIRUBY) -I"$(srcdir)/lib" "$(srcdir)/test/runner.rb" $(TESTS_BUILD)
|
||||||
|
|
|
@ -101,7 +101,7 @@ module Test
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on '--ruby VAL', "Path to ruby; It'll have used at -j option" do |a|
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -364,8 +364,9 @@ module Test
|
||||||
i,o = IO.pipe("ASCII-8BIT") # worker o>|i> master
|
i,o = IO.pipe("ASCII-8BIT") # worker o>|i> master
|
||||||
j,k = IO.pipe("ASCII-8BIT") # worker <j|<k master
|
j,k = IO.pipe("ASCII-8BIT") # worker <j|<k master
|
||||||
k.sync = true
|
k.sync = true
|
||||||
pid = spawn(*@opts[:ruby].split(/ /),File.dirname(__FILE__) +
|
pid = spawn(*@opts[:ruby],
|
||||||
"/unit/parallel.rb", *@args, out: o, in: j)
|
"#{File.dirname(__FILE__)}/unit/parallel.rb",
|
||||||
|
*@args, out: o, in: j)
|
||||||
[o,j].each{|io| io.close }
|
[o,j].each{|io| io.close }
|
||||||
{in: k, out: i, pid: pid, status: :waiting}
|
{in: k, out: i, pid: pid, status: :waiting}
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@ module TestParallel
|
||||||
def setup
|
def setup
|
||||||
i, @worker_in = IO.pipe
|
i, @worker_in = IO.pipe
|
||||||
@worker_out, o = IO.pipe
|
@worker_out, o = IO.pipe
|
||||||
@worker_pid = spawn(*@options[:ruby].split(/ /), PARALLEL_RB,
|
@worker_pid = spawn(*@options[:ruby], PARALLEL_RB,
|
||||||
"-j", "t1", "-v", out: o, in: i)
|
"-j", "t1", "-v", out: o, in: i)
|
||||||
[i,o].each(&:close)
|
[i,o].each(&:close)
|
||||||
end
|
end
|
||||||
|
@ -124,7 +124,7 @@ module TestParallel
|
||||||
class TestParallel < Test::Unit::TestCase
|
class TestParallel < Test::Unit::TestCase
|
||||||
def spawn_runner(*opt_args)
|
def spawn_runner(*opt_args)
|
||||||
@test_out, o = IO.pipe
|
@test_out, o = IO.pipe
|
||||||
@test_pid = spawn(*@options[:ruby].split(/ /), TESTS+"/runner.rb",
|
@test_pid = spawn(*@options[:ruby], TESTS+"/runner.rb",
|
||||||
"-j","t2","-x","sleeping",*opt_args, out: o)
|
"-j","t2","-x","sleeping",*opt_args, out: o)
|
||||||
o.close
|
o.close
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue