Commit 5224f4c
committed
Fix incompatibility with rake 13.4+ verbose mode
Rake 13.4.0 (PR ruby/rake#394) introduced verbose console support by
setting ENV["TESTOPTS"] = "-v". Rake 13.4.2 (PR ruby/rake#723)
fixed this to preserve existing TESTOPTS values and append -v only
when not present.
However, ci_reporter_test_unit was adding the test_unit_loader.rb
file path to TESTOPTS, which caused conflicts:
1. Before rake 13.4.2: TESTOPTS was overwritten, breaking ci_reporter
2. After rake 13.4.2: TESTOPTS preserved, but appending -v caused
rake_test_loader to interpret the loader file as a test file,
resulting in "version unknown" errors
The fix uses RUBYOPT with Ruby's -r flag instead of TESTOPTS. This
properly requires the loader before tests run, avoiding the conflict
with rake's verbose handling.
Fixes compatibility with:
- Rake 13.4.0+ with Rake::TestTask verbose mode enabled
- Projects using t.verbose = true in Rakefile
See: ruby/rake#723
See: ruby/rake#3941 parent fccc1ac commit 5224f4c
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
0 commit comments