aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--test/testunit/test_parallel.rb24
2 files changed, 22 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index e96f92ad40..13e921a9c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Feb 28 11:57:40 2011 Shota Fukumori <sorah@tubusu.net>
+
+ * test/testunit/test_parallel.rb: Temporally disable test on Windows.
+
Mon Feb 28 07:28:35 2011 Shota Fukumori <sorah@tubusu.net>
* lib/test/unit.rb(Test::Unit::Runner#after_worker_quit):
diff --git a/test/testunit/test_parallel.rb b/test/testunit/test_parallel.rb
index 62b21fc27e..8f921e01d1 100644
--- a/test/testunit/test_parallel.rb
+++ b/test/testunit/test_parallel.rb
@@ -8,6 +8,10 @@ module TestParallel
class TestParallelWorker < Test::Unit::TestCase
def setup
+ if /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
+ skip "parallel testing doesn't support Windows yet."
+ end
+
i, @worker_in = IO.pipe
@worker_out, o = IO.pipe
@worker_pid = spawn(*@options[:ruby], PARALLEL_RB,
@@ -16,13 +20,15 @@ module TestParallel
end
def teardown
- begin
- @worker_in.puts "quit"
- timeout(2) do
- Process.waitpid(@worker_pid)
+ if @worker_pid && @worker_in
+ begin
+ @worker_in.puts "quit"
+ timeout(2) do
+ Process.waitpid(@worker_pid)
+ end
+ rescue IOError, Errno::EPIPE, Timeout::Error
+ Process.kill(:KILL, @worker_pid)
end
- rescue IOError, Errno::EPIPE, Timeout::Error
- Process.kill(:KILL, @worker_pid)
end
end
@@ -122,6 +128,12 @@ module TestParallel
end
class TestParallel < Test::Unit::TestCase
+ def setup
+ if /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
+ skip "parallel testing doesn't support Windows yet."
+ end
+ end
+
def spawn_runner(*opt_args)
@test_out, o = IO.pipe
@test_pid = spawn(*@options[:ruby], TESTS+"/runner.rb",