diff options
author | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-22 09:47:28 +0000 |
---|---|---|
committer | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-22 09:47:28 +0000 |
commit | 1a6b0bab94a1594d892afd498b08830a29089422 (patch) | |
tree | a91bfe721bff89d626d90419e75158fe9b44e059 | |
parent | c0ec3efcae87aab655738ff7fa2ea16986b9ef84 (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-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/test/unit.rb | 12 |
2 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Wed Feb 22 18:44:41 2012 Shota Fukumori <[email protected]> + + * lib/test/unit.rb (setup_options): add option "--retry" as opposite + for "--no-retry" + Wed Feb 22 18:34:02 2012 Shota Fukumori <[email protected]> * 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 |