From: Jens Lehmann <Jens.Lehmann@web.de>
To: Git Mailing List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [RFC PATCH] tests: print failed test numbers at the end of the test run
Date: Sat, 23 Jul 2011 21:16:02 +0200 [thread overview]
Message-ID: <4E2B1DF2.4000003@web.de> (raw)
On modern multi-core processors "make test" is often run in multiple jobs.
If one of them fails the test run does stop, but the concurrently running
tests finish their run. Finding out what test is broken involves a lot of
scrolling. That gets even worse when the -i option is used.
If one or more tests failed, print a list of them before the test summary:
failed test(s): t1000 t6500
fixed 0
success 7638
failed 3
broken 49
total 7723
This makes it possible to just run the test suite with -i and collect all
failed test scripts at the end for further examination.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
Maybe I'm missing something completely obvious, but I always have a hard
time finding out which test scripts did fail in a test run with -j30.
t/aggregate-results.sh | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/t/aggregate-results.sh b/t/aggregate-results.sh
index d206b7c..b8e929a 100755
--- a/t/aggregate-results.sh
+++ b/t/aggregate-results.sh
@@ -1,5 +1,6 @@
#!/bin/sh
+failed_tests=
fixed=0
success=0
failed=0
@@ -18,7 +19,12 @@ do
success)
success=$(($success + $value)) ;;
failed)
- failed=$(($failed + $value)) ;;
+ failed=$(($failed + $value))
+ if test $value != 0; then
+ testnum=$(echo $file | cut -b 14-18)
+ failed_tests="$failed_tests $testnum"
+ fi
+ ;;
broken)
broken=$(($broken + $value)) ;;
total)
@@ -27,6 +33,10 @@ do
done <"$file"
done
+if [ -n "$failed_tests" ]; then
+ printf "\nfailed test(s):$failed_tests\n\n"
+fi
+
printf "%-8s%d\n" fixed $fixed
printf "%-8s%d\n" success $success
printf "%-8s%d\n" failed $failed
--
1.7.6.346.g750efc
next reply other threads:[~2011-07-23 19:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-23 19:16 Jens Lehmann [this message]
2011-07-24 7:41 ` [RFC PATCH] tests: print failed test numbers at the end of the test run Junio C Hamano
2011-07-24 13:35 ` [PATCH v2] " Jens Lehmann
2011-07-24 15:39 ` Jeff King
2011-07-24 19:21 ` Jens Lehmann
2011-07-25 14:31 ` Sverre Rabbelier
2011-07-26 4:25 ` [RFC PATCH] " Nguyen Thai Ngoc Duy
2011-07-26 5:42 ` Jeff King
2011-07-26 6:10 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E2B1DF2.4000003@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).