ruby-changes:52739
From: k0kubun <ko1@a...>
Date: Mon, 8 Oct 2018 10:08:42 +0900 (JST)
Subject: [ruby-changes:52739] k0kubun:r64951 (trunk): test_jit.rb: skip to test tempdir emptiness
k0kubun 2018-10-08 10:08:37 +0900 (Mon, 08 Oct 2018) New Revision: 64951 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64951 Log: 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. Modified files: trunk/test/ruby/test_jit.rb Index: test/ruby/test_jit.rb =================================================================== --- test/ruby/test_jit.rb (revision 64950) +++ test/ruby/test_jit.rb (revision 64951) @@ -585,8 +585,13 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L585 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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L721 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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L803 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.' -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/