* dtc: Fix summary calculation in testsuite
@ 2007-08-29 2:18 David Gibson
2007-08-30 13:51 ` Jon Loeliger
0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2007-08-29 2:18 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
The bookkeeping for producing the testsuite summary (total number of
tests passed, failed and so forth) is broken. It uses $? across
several tests, but for checks after the first, the value of $? will no
longer contain the original return code, but just that from the
previous test. This patch fixes the problem.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/tests/run_tests.sh
===================================================================
--- dtc.orig/tests/run_tests.sh 2007-08-29 12:04:11.000000000 +1000
+++ dtc/tests/run_tests.sh 2007-08-29 12:04:37.000000000 +1000
@@ -15,12 +15,15 @@
echo -n "$@: "
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]
+ ret="$?"
+ if [ "$ret" == "1" ]; then
+ tot_config=$[tot_config + 1]
+ elif [ "$ret" == "2" ]; then
+ tot_fail=$[tot_fail + 1]
+ else
+ tot_strange=$[tot_strange + 1]
+ fi
fi
}
--
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: dtc: Fix summary calculation in testsuite
2007-08-29 2:18 dtc: Fix summary calculation in testsuite David Gibson
@ 2007-08-30 13:51 ` Jon Loeliger
0 siblings, 0 replies; 2+ messages in thread
From: Jon Loeliger @ 2007-08-30 13:51 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
So, like, the other day David Gibson mumbled:
> The bookkeeping for producing the testsuite summary (total number of
> tests passed, failed and so forth) is broken. It uses $? across
> several tests, but for checks after the first, the value of $? will no
> longer contain the original return code, but just that from the
> previous test. This patch fixes the problem.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Applied.
Thanks,
jdl
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-30 13:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-29 2:18 dtc: Fix summary calculation in testsuite David Gibson
2007-08-30 13:51 ` Jon Loeliger
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).