From 13d2225c460cfc3daa679acb89433289527a844f Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 26 Aug 2022 23:32:01 -0700 Subject: [PATCH] Try rm -rf instead of FileUtils.rm_rf FileUtils.rm_rf started to randomly fail on http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker since around https://github.com/ruby/fileutils/pull/99. --- test/rubygems/helper.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb index cb0177adb2..b9bc72a1f3 100644 --- a/test/rubygems/helper.rb +++ b/test/rubygems/helper.rb @@ -465,7 +465,12 @@ class Gem::TestCase < Test::Unit::TestCase Dir.chdir @current_dir - FileUtils.rm_rf @tempdir + # FileUtils.rm_rf randomly fails on ci.rvm.jp trunk-mjit + if ENV['RUBY_DEBUG']&.include?('ci') + system('rm', '-rf', @tempdir.shellescape, exception: true) + else + FileUtils.rm_rf @tempdir + end ENV.replace(@orig_env)