Skip to content

Commit

Permalink
respect RUBY_TEST_TIMEOUT_SCALE
Browse files Browse the repository at this point in the history
GC benchmarks will spend long time with assertions so we need
to respect `RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE` environment variable.

@nobu pointed out that now `RUBY_TEST_TIMEOUT_SCALE` is primary
(and `RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE` was obsolete so check both
and will remove it later.
  • Loading branch information
ko1 committed Jun 10, 2024
1 parent 4c8f9c9 commit 448efa9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bootstraptest/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ def main
BT.quiet = false
BT.timeout = 180
BT.timeout_scale = (defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? ? 3 : 1) # for --jit-wait
if (ts = (ENV["RUBY_TEST_TIMEOUT_SCALE"] || ENV["RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE"]).to_i) > 1
BT.timeout_scale *= ts
end

# BT.wn = 1
dir = nil
quiet = false
Expand Down

0 comments on commit 448efa9

Please sign in to comment.