Chect what remains in TMPDIR

I guess it has a shared library file created by MJIT, but I want to make
sure the fact.
This commit is contained in:
Yusuke Endoh 2022-08-29 12:50:47 +09:00
parent 41a275c89a
commit 7bdb999d0f

View File

@ -466,13 +466,18 @@ class Gem::TestCase < Test::Unit::TestCase
Dir.chdir @current_dir
# Prevent a race condition on removing TMPDIR being written by MJIT
if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
RubyVM::MJIT.pause(wait: false)
end
FileUtils.rm_rf @tempdir
if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
RubyVM::MJIT.resume
#if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
# RubyVM::MJIT.pause(wait: false)
#end
begin
FileUtils.rm_rf @tempdir
ensure
# mame: Temporal code for debugging. Let me confirm what remains in the directory
pp Dir.glob(File.join(@tempdir, "**", "{.*,*}")) if $!
end
#if defined?(RubyVM::MJIT.enabled?) && RubyVM::MJIT.enabled?
# RubyVM::MJIT.resume
#end
ENV.replace(@orig_env)