diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-04 02:18:23 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-04 02:18:23 +0000 |
commit | f1056b2e50da88dfbf525dfb66d4253d696b8523 (patch) | |
tree | 7be4140f2bf54ebf176c72d0bd3e33d7c428825c | |
parent | 02a817ee4c9e42c0878ebad41cf2c58af600ac45 (diff) |
* test/{dbm,gdbm,sdbm}/test_{dbm,gdbm,sdbm}.rb: skip some tests
which using fork on fork-less platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | test/dbm/test_dbm.rb | 11 | ||||
-rw-r--r-- | test/gdbm/test_gdbm.rb | 11 | ||||
-rw-r--r-- | test/sdbm/test_sdbm.rb | 10 |
4 files changed, 38 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon Jul 4 11:15:37 2005 NAKAMURA Usaku <usa@ruby-lang.org> + + * test/{dbm,gdbm,sdbm}/test_{dbm,gdbm,sdbm}.rb: skip some tests + which using fork on fork-less platforms. + Sun Jul 3 23:26:30 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> * test/wsdl/document/test_rpc.rb: compare formatted time string of @@ -389,7 +394,7 @@ Sat May 28 16:40:15 2005 GOTOU Yuuzou <gotoyuzo@notwork.org> * test/openssl/test_x509store.rb: add test for expired CRL and refine some assertions. - May 28 05:15:51 2005 GOTOU Yuuzou <gotoyuzo@notwork.org> +Sat May 28 05:15:51 2005 GOTOU Yuuzou <gotoyuzo@notwork.org> * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_time): should not set internal flag directry. diff --git a/test/dbm/test_dbm.rb b/test/dbm/test_dbm.rb index 53ab4c83a6..4f49da3f68 100644 --- a/test/dbm/test_dbm.rb +++ b/test/dbm/test_dbm.rb @@ -61,6 +61,15 @@ if defined? DBM end end + def have_fork? + begin + fork{} + true + rescue NotImplementedError + false + end + end + def test_s_new_has_no_block # DBM.new ignore the block foo = true @@ -77,6 +86,7 @@ if defined? DBM assert_equal(DBM.open("tmptest_dbm") { :foo }, :foo) end def test_s_open_lock + return unless have_fork? # snip this test fork() { assert_instance_of(DBM, dbm = DBM.open("tmptest_dbm", 0644)) sleep 2 @@ -115,6 +125,7 @@ if defined? DBM if not defined? DBM::NOLOCK return end + return unless have_fork? # snip this test fork() { assert_instance_of(DBM, dbm = DBM.open("tmptest_dbm", 0644, diff --git a/test/gdbm/test_gdbm.rb b/test/gdbm/test_gdbm.rb index e3f52ef5ed..74223b0bb4 100644 --- a/test/gdbm/test_gdbm.rb +++ b/test/gdbm/test_gdbm.rb @@ -58,6 +58,15 @@ if defined? GDBM end end + def have_fork? + begin + fork{} + true + rescue NotImplementedError + false + end + end + def test_s_new_has_no_block # GDBM.new ignore the block foo = true @@ -108,6 +117,7 @@ if defined? GDBM assert_equal(GDBM.open("tmptest_gdbm") { :foo }, :foo) end def test_s_open_lock + return unless have_fork? # snip this test fork() { assert_instance_of(GDBM, gdbm = GDBM.open("tmptest_gdbm", 0644)) sleep 2 @@ -146,6 +156,7 @@ if defined? GDBM if not defined? GDBM::NOLOCK return end + return unless have_fork? # snip this test fork() { assert_instance_of(GDBM, gdbm = GDBM.open("tmptest_gdbm", 0644, diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb index 488b37a9a5..abaadbaf71 100644 --- a/test/sdbm/test_sdbm.rb +++ b/test/sdbm/test_sdbm.rb @@ -31,6 +31,15 @@ class TestSDBM < Test::Unit::TestCase end end + def have_fork? + begin + fork{} + true + rescue NotImplementedError + false + end + end + def test_version assert(! SDBM.const_defined?(:VERSION)) end @@ -70,6 +79,7 @@ class TestSDBM < Test::Unit::TestCase if not defined? SDBM::NOLOCK return end + return unless have_fork? # snip this test fork() { assert_instance_of(SDBM, sdbm = SDBM.open("tmptest_sdbm", 0644, |