summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-22 09:47:28 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-22 09:47:28 +0000
commit1a6b0bab94a1594d892afd498b08830a29089422 (patch)
treea91bfe721bff89d626d90419e75158fe9b44e059
parentc0ec3efcae87aab655738ff7fa2ea16986b9ef84 (diff)
* lib/test/unit.rb (setup_options): add option "--retry" as opposite
for "--no-retry" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/test/unit.rb12
2 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index b61acf8a29..763fe87b8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Feb 22 18:44:41 2012 Shota Fukumori <sorah@tubusu.net>
+
+ * lib/test/unit.rb (setup_options): add option "--retry" as opposite
+ for "--no-retry"
+
Wed Feb 22 18:34:02 2012 Shota Fukumori <sorah@tubusu.net>
* lib/test/unit.rb (setup_options): add option "--show-skip" to
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index 7db23f8cea..16f50c64b2 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -64,6 +64,8 @@ module Test
opts.separator 'minitest options:'
opts.version = MiniTest::Unit::VERSION
+ options[:retry] = true
+
opts.on '-h', '--help', 'Display this help.' do
puts opts
exit
@@ -101,8 +103,12 @@ module Test
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|
@@ -552,7 +558,7 @@ module Test
end
end
- if @interrupt || @options[:no_retry] || @need_quit
+ if @interrupt || !@options[:retry] || @need_quit
rep.each do |r|
report.push(*r[:report])
end