aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-24 23:23:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-24 23:23:14 +0000
commit80d4eaae3b20aad410868bc14dca15c7bcaddaff (patch)
tree208d2aaffcebbcf612a2d95eda30a05b8bc6bca2 /test
parent5483ce3b792df304a1f25fc4474007b0fbd39c18 (diff)
downloadruby-80d4eaae3b20aad410868bc14dca15c7bcaddaff.tar.gz
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')
-rw-r--r--test/lib/test/unit.rb4
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