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

ruby-changes:22692

From: sorah <ko1@a...>
Date: Wed, 22 Feb 2012 18:47:48 +0900 (JST)
Subject: [ruby-changes:22692] sorah:r34741 (trunk): * lib/test/unit.rb (setup_options): add option "--retry" as opposite

sorah	2012-02-22 18:47:28 +0900 (Wed, 22 Feb 2012)

  New Revision: 34741

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34741

  Log:
    * lib/test/unit.rb (setup_options): add option "--retry" as opposite
      for "--no-retry"

  Modified files:
    trunk/ChangeLog
    trunk/lib/test/unit.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34740)
+++ ChangeLog	(revision 34741)
@@ -1,3 +1,8 @@
+Wed Feb 22 18:44:41 2012  Shota Fukumori  <sorah@t...>
+
+	* lib/test/unit.rb (setup_options): add option "--retry" as opposite
+	  for "--no-retry"
+
 Wed Feb 22 18:34:02 2012  Shota Fukumori  <sorah@t...>
 
 	* lib/test/unit.rb (setup_options): add option "--show-skip" to
Index: lib/test/unit.rb
===================================================================
--- lib/test/unit.rb	(revision 34740)
+++ lib/test/unit.rb	(revision 34741)
@@ -64,6 +64,8 @@
         opts.separator 'minitest options:'
         opts.version = MiniTest::Unit::VERSION
 
+        options[:retry] = true
+
         opts.on '-h', '--help', 'Display this help.' do
           puts opts
           exit
@@ -101,10 +103,14 @@
           options[:separate] = true
         end
 
-        opts.on '--no-retry', "Don't retry running testcase when --jobs specified" do
-          options[:no_retry] = true
+        opts.on '--retry', "Retry running testcase when --jobs specified" do
+          options[:retry] = true
         end
 
+        opts.on '--no-retry', "Disable --retry" do
+          options[:retry] = false
+        end
+
         opts.on '--ruby VAL', "Path to ruby; It'll have used at -j option" do |a|
           options[:ruby] = a.split(/ /).reject(&:empty?)
         end
@@ -552,7 +558,7 @@
             end
           end
 
-          if @interrupt || @options[:no_retry] || @need_quit
+          if @interrupt || !@options[:retry] || @need_quit
             rep.each do |r|
               report.push(*r[:report])
             end

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

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