summaryrefslogtreecommitdiff
path: root/bootstraptest/runner.rb
diff options
context:
space:
mode:
authorKoichi Sasada <[email protected]>2024-06-10 12:10:56 +0900
committerKoichi Sasada <[email protected]>2024-06-10 13:32:14 +0900
commit448efa90af19a680f740aeb86e85782e868e7ae7 (patch)
tree60afa6ea95a65255168caa72230afbcec5210d8b /bootstraptest/runner.rb
parent4c8f9c93f6de925cfa1fcbdf337d005ce9755a1c (diff)
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.
Diffstat (limited to 'bootstraptest/runner.rb')
-rwxr-xr-xbootstraptest/runner.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 329d429f33..3e54318ac9 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -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