From: David Gibson <david@gibson.dropbear.id.au>
To: Jon Loeliger <jdl@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: dtc: Count testcases and results in the dtc/libfdt testsuite
Date: Tue, 26 Jun 2007 11:33:10 +1000 [thread overview]
Message-ID: <20070626013310.GC4383@localhost.localdomain> (raw)
There are quite a lot of testcases in the dtc testsuite (recently
imported from libfdt). It can be easy to miss a stray FAIL result in
the midst of all the rest. To improve this, this patch adds a summary
to the end of the testsuite results giving the total number of tests
along with the number of PASSes FAILs and other results.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/tests/run_tests.sh
===================================================================
--- dtc.orig/tests/run_tests.sh 2007-06-18 17:02:44.000000000 +1000
+++ dtc/tests/run_tests.sh 2007-06-18 17:10:41.000000000 +1000
@@ -4,9 +4,24 @@ export QUIET_TEST=1
ENV=/usr/bin/env
+tot_tests=0
+tot_pass=0
+tot_fail=0
+tot_config=0
+tot_strange=0
+
run_test () {
+ tot_tests=$[tot_tests + 1]
echo -n "$@: "
- PATH=".:$PATH" $ENV "$@"
+ if PATH=".:$PATH" $ENV "$@"; then
+ tot_pass=$[tot_pass + 1]
+ elif [ "$?" == "1" ]; then
+ tot_config=$[tot_config + 1]
+ elif [ "$?" == "2" ]; then
+ tot_fail=$[tot_fail + 1]
+ else
+ tot_strange=$[tot_strange + 1]
+ fi
}
tree1_tests () {
@@ -92,3 +107,12 @@ for set in $TESTSETS; do
;;
esac
done
+
+echo -e "********** TEST SUMMARY"
+echo -e "* Total testcases: $tot_tests"
+echo -e "* PASS: $tot_pass"
+echo -e "* FAIL: $tot_fail"
+echo -e "* Bad configuration: $tot_config"
+echo -e "* Strange test result: $tot_strange"
+echo -e "**********"
+
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next reply other threads:[~2007-06-26 1:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-26 1:33 David Gibson [this message]
2007-06-26 2:45 ` dtc: Count testcases and results in the dtc/libfdt testsuite Jon Loeliger
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=20070626013310.GC4383@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=jdl@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
/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).