diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-23 02:23:21 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-23 02:23:21 +0000 |
| commit | 5e998f9e4cb7a6df0ab2245aad31d1a6e45d5a96 (patch) | |
| tree | bd07f668fe94e0ba413a6cfc1fd83571719694ab /bootstraptest | |
| parent | f2d22879086a858bfb28dbd8d1b591848d720c70 (diff) | |
| download | ruby-5e998f9e4cb7a6df0ab2245aad31d1a6e45d5a96.tar.gz ruby-5e998f9e4cb7a6df0ab2245aad31d1a6e45d5a96.tar.xz ruby-5e998f9e4cb7a6df0ab2245aad31d1a6e45d5a96.zip | |
* bootstraptest/test_{knownbug,thread}.rb: support fork-less platform.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
| -rw-r--r-- | bootstraptest/test_knownbug.rb | 12 | ||||
| -rw-r--r-- | bootstraptest/test_thread.rb | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index acb62152d..9b688fca0 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -68,11 +68,15 @@ assert_equal 'ok', %q{ assert_equal 'true', %{ t = Thread.new { loop {} } - pid = fork { + begin + pid = fork { exit t.status != "run" - } - Process.wait pid - $?.success? + } + Process.wait pid + $?.success? + rescue NotImplementedError + true + end } assert_valid_syntax('1.times {|i|print (42),1;}', '[ruby-list:44479]') diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb index 7810455c8..626d67144 100644 --- a/bootstraptest/test_thread.rb +++ b/bootstraptest/test_thread.rb @@ -202,9 +202,13 @@ end }, '[ruby-dev:31371]' assert_equal 'true', %{ t = Thread.new { loop {} } - pid = fork { + begin + pid = fork { exit t.status != "run" - } - Process.wait pid - $?.success? + } + Process.wait pid + $?.success? + rescue NotImplementedError + true + end } |
