[前][次][番号順一覧][スレッド一覧]

ruby-changes:52615

From: nobu <ko1@a...>
Date: Tue, 25 Sep 2018 08:23:20 +0900 (JST)
Subject: [ruby-changes:52615] nobu:r64827 (trunk): test/unit.rb: fix --subprocess-timeout-scale

nobu	2018-09-25 08:23:14 +0900 (Tue, 25 Sep 2018)

  New Revision: 64827

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64827

  Log:
    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.

  Modified files:
    trunk/test/lib/test/unit.rb
Index: test/lib/test/unit.rb
===================================================================
--- test/lib/test/unit.rb	(revision 64826)
+++ test/lib/test/unit.rb	(revision 64827)
@@ -1048,10 +1048,14 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L1048
           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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]