diff options
author | Yusuke Endoh <[email protected]> | 2023-11-15 17:52:46 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2023-11-15 19:27:10 +0900 |
commit | 5bf75c20a2098e626d0dd65708a35c46039c5310 (patch) | |
tree | bbe0796b786013df3725b44ec3409965f8f3eb94 /test/runner.rb | |
parent | 960a031a06e4401589cfa29673e27b0bf2895f6d (diff) |
Refactor the settings of test-all out
test/runner.rb and tool/lib/test/unit/parallel.rb must use the same
settings. However, some settings were copied and pasted, while some were
added only to test/runner.rb.
This changeset creates tool/test/init.rb for all settings of test-unit,
which is loaded not only by test/runner.rb but also
tool/lib/test/unit/parallel.rb.
Background: the GEM_HOME environment variable was removed in
test/runner.rb, which prohibit `require "rake"` (note that rake is a
bundled gem). However the parallel mode didn't refrect this setting,
i.e., `require "rake"` was allowed.
This leads to an inconsistency, which actually affected a test test
defines s test class *only when* `require "rake"` is successful.
(test/rubygems/test_gem_package_task.rb)
https://github.com/ruby/ruby/actions/runs/6807729617/job/18511055636#step:8:1714
```
/home/runner/work/ruby/ruby/src/tool/lib/test/unit.rb:729:in `const_get': uninitialized constant TestGemPackageTask (NameError)
suites.map! {|r| ::Object.const_get(r[:testcase])}
^^^^^^^^^^
```
Diffstat (limited to 'test/runner.rb')
-rw-r--r-- | test/runner.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/test/runner.rb b/test/runner.rb index f58647d7e3..c34517cbf2 100644 --- a/test/runner.rb +++ b/test/runner.rb @@ -1,9 +1,5 @@ # frozen_string_literal: true -# Should be done in rubygems test files? -ENV["GEM_SKIP"] = ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze -ENV.delete("RUBY_CODESIGN") - -Warning[:experimental] = false +# NOTE: Do not add any settings here for test-all. Instead, please add it to ../tool/test/init.rb. require_relative '../tool/test/runner' |