diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-24 23:23:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-24 23:23:14 +0000 |
commit | 4172d08261e649d721c03ee7f368b568abc892a6 (patch) | |
tree | 208d2aaffcebbcf612a2d95eda30a05b8bc6bca2 /test/lib | |
parent | c0f0cff56f9bc43bbdbd823974414cef22031c1b (diff) |
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
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/test/unit.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb index da05d57344..f588aec551 100644 --- a/test/lib/test/unit.rb +++ b/test/lib/test/unit.rb @@ -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 |