mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/unit.rb: fix --subprocess-timeout-scale
* test/lib/test/unit.rb (Test::Unit::SubprocessOption#non_options): set timeout scale after parsing options. the option value will be set after returning from setup_options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c0f0cff56f
commit
4172d08261
1 changed files with 4 additions and 0 deletions
|
@ -1048,10 +1048,14 @@ module Test
|
|||
raise OptionParser::InvalidArgument, "timeout scale must be positive" unless scale > 0
|
||||
options[:timeout_scale] = scale
|
||||
end
|
||||
end
|
||||
|
||||
def non_options(files, options)
|
||||
if scale = options[:timeout_scale] or
|
||||
(scale = ENV["RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE"] and (scale = scale.to_f) > 0)
|
||||
EnvUtil.subprocess_timeout_scale = scale
|
||||
end
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue