summaryrefslogtreecommitdiff
path: root/tool/test/init.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/test/init.rb')
-rw-r--r--tool/test/init.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/tool/test/init.rb b/tool/test/init.rb
index 3a1143d01d..3fd1419a9c 100644
--- a/tool/test/init.rb
+++ b/tool/test/init.rb
@@ -1,7 +1,15 @@
-# This file includes the settings for "make test-all".
+# This file includes the settings for "make test-all" and "make test-tool".
# Note that this file is loaded not only by test/runner.rb but also by tool/lib/test/unit/parallel.rb.
-ENV["GEM_SKIP"] = ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze
+# Prevent test-all from using bundled gems
+["GEM_HOME", "GEM_PATH"].each do |gem_env|
+ # Preserve the gem environment prepared by tool/runruby.rb for test-tool, which uses bundled gems.
+ ENV["BUNDLED_#{gem_env}"] = ENV[gem_env]
+
+ ENV[gem_env] = "".freeze
+end
+ENV["GEM_SKIP"] = "".freeze
+
ENV.delete("RUBY_CODESIGN")
Warning[:experimental] = false