Skip to content

Commit 448efa9

Browse files
committed
respect RUBY_TEST_TIMEOUT_SCALE
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.
1 parent 4c8f9c9 commit 448efa9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bootstraptest/runner.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ def main
163163
BT.quiet = false
164164
BT.timeout = 180
165165
BT.timeout_scale = (defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? ? 3 : 1) # for --jit-wait
166+
if (ts = (ENV["RUBY_TEST_TIMEOUT_SCALE"] || ENV["RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE"]).to_i) > 1
167+
BT.timeout_scale *= ts
168+
end
169+
166170
# BT.wn = 1
167171
dir = nil
168172
quiet = false

0 commit comments

Comments
 (0)