Skip to content

Commit

Permalink
Chect what remains in TMPDIR
Browse files Browse the repository at this point in the history
I guess it has a shared library file created by MJIT, but I want to make
sure the fact.
  • Loading branch information
mame committed Aug 29, 2022
1 parent 41a275c commit 7bdb999
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions test/rubygems/helper.rb
Expand Up @@ -466,13 +466,18 @@ def teardown
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
end
#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)

Expand Down

0 comments on commit 7bdb999

Please sign in to comment.