From 5a1cf1c5cb2dd1007389a5c3f2ef5bcecc74a6ac Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 21 Dec 2007 21:35:08 +0000 Subject: * bootstraptest/test_fork.rb: skip if fork is not unsupported. * bootstraptest/test_io.rb: skip if require failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ bootstraptest/test_fork.rb | 12 ++++++++---- bootstraptest/test_io.rb | 29 ++++++++++++++++------------- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ebd0538b9..b455e41956 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Dec 22 06:30:04 2007 Koichi Sasada + + * bootstraptest/test_fork.rb: skip if fork is not unsupported. + + * bootstraptest/test_io.rb: skip if require failed. + Sat Dec 22 06:09:12 2007 David Flanagan * io.c: fix typo in rdoc comment diff --git a/bootstraptest/test_fork.rb b/bootstraptest/test_fork.rb index ae8d9e174d..743c22c250 100644 --- a/bootstraptest/test_fork.rb +++ b/bootstraptest/test_fork.rb @@ -1,6 +1,10 @@ assert_equal '0', %q{ - GC.stress = true - pid = fork {} - Process.wait pid - $?.to_i + begin + GC.stress = true + pid = fork {} + Process.wait pid + $?.to_i + rescue NotImplementedError + 0 + end }, '[ruby-dev:32404]' diff --git a/bootstraptest/test_io.rb b/bootstraptest/test_io.rb index 20a441de9f..fa3654379f 100644 --- a/bootstraptest/test_io.rb +++ b/bootstraptest/test_io.rb @@ -9,17 +9,20 @@ assert_finish 5, %q{ }, '[ruby-dev:31866]' assert_finish 10, %q{ - require "io/nonblock" - r, w = IO.pipe - w.nonblock = true - w.write_nonblock("a" * 100000) - w.nonblock = false - t1 = Thread.new { w.write("b" * 4096) } - t2 = Thread.new { w.write("c" * 4096) } - sleep 0.5 - r.sysread(4096).length - sleep 0.5 - r.sysread(4096).length - t1.join - t2.join + begin + require "io/nonblock" + r, w = IO.pipe + w.nonblock = true + w.write_nonblock("a" * 100000) + w.nonblock = false + t1 = Thread.new { w.write("b" * 4096) } + t2 = Thread.new { w.write("c" * 4096) } + sleep 0.5 + r.sysread(4096).length + sleep 0.5 + r.sysread(4096).length + t1.join + t2.join + rescue LoadError + end }, '[ruby-dev:32566]' -- cgit v1.2.3