[ruby/mmtk] Use RUBY_TEST_TIMEOUT_SCALE for tests
RUBY_TEST_TIMEOUT_SCALE is set for debug builds because they are slower to run. We should respect this environment variable in MMTk tests too. https://github.com/ruby/mmtk/commit/0a66c518bf
This commit is contained in:
parent
b4bf3ed130
commit
50469809b8
@ -9,9 +9,18 @@ module MMTk
|
||||
|
||||
def setup
|
||||
omit "Not running on MMTk" unless using_mmtk?
|
||||
|
||||
@original_timeout_scale = EnvUtil.timeout_scale
|
||||
timeout_scale = ENV["RUBY_TEST_TIMEOUT_SCALE"].to_f
|
||||
EnvUtil.timeout_scale = timeout_scale if timeout_scale > 0
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
def teardown
|
||||
EnvUtil.timeout_scale = @original_timeout_scale
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def using_mmtk?
|
||||
|
@ -1,5 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "helper"
|
||||
|
||||
module MMTk
|
||||
class TestConfiguration < TestCase
|
||||
def test_MMTK_THREADS
|
||||
|
Loading…
x
Reference in New Issue
Block a user