summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-15 10:11:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-15 10:11:32 +0000
commit0dc5b8ce8c11d196ed44d333c4bfae8c7f2d0bac (patch)
tree13a00639e0d361c65b101ed0ecd573cd4ef4aad1
parent19b4b7de3b82466eb99b4027430cdf88718610a0 (diff)
Revert r35576 "lib/test/unit.rb: refactoring puke"
* lib/test/unit.rb (Test::Unit::Runner#puke): always add skipped results to the report for parallel test. [Bug #6595] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/test/unit.rb22
2 files changed, 20 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 73f14ccae6..ed06937658 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jun 15 19:11:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/test/unit.rb (Test::Unit::Runner#puke): always add skipped
+ results to the report for parallel test. [Bug #6595]
+
Fri Jun 15 09:01:35 2012 Yuki Yugui Sonoda <yugui@google.com>
* nacl/pepper_main.c: Removed an unnecessary and errorneous inclusion.
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index 7b3554cbed..9d676b18ff 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -735,13 +735,21 @@ module Test
# TODO:
# this overriding is for minitest feature that skip messages are
# hidden when not verbose (-v), note this is temporally.
- n = report.size
- rep = super
- if MiniTest::Skip === e and /no message given\z/ =~ e.message
- report.slice!(n..-1)
- rep = "."
- end
- rep
+ e = case e
+ when MiniTest::Skip then
+ @skips += 1
+ return "." if /no message given\z/ =~ e.message
+ "Skipped:\n#{meth}(#{klass}) [#{location e}]:\n#{e.message}\n"
+ when MiniTest::Assertion then
+ @failures += 1
+ "Failure:\n#{meth}(#{klass}) [#{location e}]:\n#{e.message}\n"
+ else
+ @errors += 1
+ bt = MiniTest::filter_backtrace(e.backtrace).join "\n "
+ "Error:\n#{meth}(#{klass}):\n#{e.class}: #{e.message}\n #{bt}\n"
+ end
+ @report << e
+ e[0, 1]
end
def initialize # :nodoc: