summaryrefslogtreecommitdiff
path: root/test/ruby/test_jit.rb
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-08 01:08:37 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-08 01:08:37 +0000
commite0bc5e49ffc1a013705e1e287967139425912974 (patch)
treebdb2d39838138fb62055800c8899aaa7e9fd483f /test/ruby/test_jit.rb
parent1f49e9bc62cec47ba62769dff8bf12490cab0f4f (diff)
test_jit.rb: skip to test tempdir emptiness
on AppVeyor mswin. It's somehow failing and not reproductive on my environment. We're suspecting maybe somebody is still holding module handle, even while FreeLibrary is finished successfully. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_jit.rb')
-rw-r--r--test/ruby/test_jit.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index ac5ea211f4..0bfedd3017 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -585,8 +585,13 @@ class TestJIT < Test::Unit::TestCase
assert_equal(2, compactions.size, debug_info)
end
- # verify .o files are deleted on unload_units
- assert_send([Dir, :empty?, dir], debug_info)
+ if appveyor_mswin?
+ # "Permission Denied" error is preventing to remove so file on AppVeyor.
+ warn 'skipped to test directory emptiness in TestJIT#test_unload_units on AppVeyor mswin'
+ else
+ # verify .o files are deleted on unload_units
+ assert_send([Dir, :empty?, dir], debug_info)
+ end
end
end
@@ -716,6 +721,9 @@ class TestJIT < Test::Unit::TestCase
end
def test_clean_so
+ if appveyor_mswin?
+ skip 'Removing so file is failing on AppVeyor mswin due to Permission Denied.'
+ end
Dir.mktmpdir("jit_test_clean_so_") do |dir|
code = "x = 0; 10.times {|i|x+=i}"
eval_with_jit({"TMPDIR"=>dir}, code)
@@ -795,6 +803,10 @@ class TestJIT < Test::Unit::TestCase
private
+ def appveyor_mswin?
+ ENV['APPVEYOR'] == 'True' && RUBY_PLATFORM.match?(/mswin/)
+ end
+
def skip_on_mingw
if RUBY_PLATFORM.match?(/mingw/)
skip 'This test does not succeed on mingw yet.'