[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
|
def setup
|
||||||
omit "Not running on MMTk" unless using_mmtk?
|
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
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def teardown
|
||||||
|
EnvUtil.timeout_scale = @original_timeout_scale
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def using_mmtk?
|
def using_mmtk?
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "helper"
|
require_relative "helper"
|
||||||
|
|
||||||
module MMTk
|
module MMTk
|
||||||
class TestConfiguration < TestCase
|
class TestConfiguration < TestCase
|
||||||
def test_MMTK_THREADS
|
def test_MMTK_THREADS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user