summaryrefslogtreecommitdiff
path: root/tool/lib
diff options
context:
space:
mode:
authorlukeg <luke.gru@gmail.com>2023-02-26 17:20:52 -0500
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-02-28 06:34:27 +0900
commitba55706fb6b98a01f17909bf5830b66aa68f8fc4 (patch)
tree77846a9c83c21e6b71ba1bc6b7196deab4b0b279 /tool/lib
parent283c71eeffc02da6928d7a14f42a0d38d00f592d (diff)
downloadruby-ba55706fb6b98a01f17909bf5830b66aa68f8fc4.tar.gz
fix test/rubygems/test_gem_package_task.rb when in -j mode
This test skipped sometimes due to failure to load 'rake/packagetask'. This is due to manipulation of $LOAD_PATH by other rubygems tests. If rake is loaded before any rubygems tests run, then it works fine. To reproduce the skipping behavior: $ make test-all TESTOPTS="-j6 --test-order=sorted test/rubygems/test_*.rb"
Diffstat (limited to 'tool/lib')
-rw-r--r--tool/lib/test/unit/parallel.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/tool/lib/test/unit/parallel.rb b/tool/lib/test/unit/parallel.rb
index b3a8957f26..407e3fa1a2 100644
--- a/tool/lib/test/unit/parallel.rb
+++ b/tool/lib/test/unit/parallel.rb
@@ -208,5 +208,9 @@ if $0 == __FILE__
end
end
require 'rubygems'
+ begin
+ require 'rake'
+ rescue LoadError
+ end
Test::Unit::Worker.new.run(ARGV)
end