From 0b9dac5de7ecf8111dd3d9fa621edc759c9c47e3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 6 Feb 2009 22:35:54 -0800 Subject: Aggregate test results so they're more readable Makes it much easier to track down failures if you know something failed in the first place. A failed test early on could be hidden because noise from successful tests drowned it out. --- test/aggregate.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 test/aggregate.rb (limited to 'test') diff --git a/test/aggregate.rb b/test/aggregate.rb new file mode 100755 index 0000000..1c2cc5c --- /dev/null +++ b/test/aggregate.rb @@ -0,0 +1,13 @@ +#!/usr/bin/ruby -n +BEGIN { $tests = $assertions = $failures = $errors = 0 } + +$_ =~ /(\d+) tests, (\d+) assertions, (\d+) failures, (\d+) errors/ or next +$tests += $1.to_i +$assertions += $2.to_i +$failures += $3.to_i +$errors += $4.to_i + +END { + printf("\n%d tests, %d assertions, %d failures, %d errors\n", + $tests, $assertions, $failures, $errors) +} -- cgit v1.2.3-24-ge0c7