From: David Gibson <david@gibson.dropbear.id.au>
To: Jon Loeliger <jdl@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: dtc: Fix summary calculation in testsuite
Date: Wed, 29 Aug 2007 12:18:51 +1000 [thread overview]
Message-ID: <20070829021851.GA25233@localhost.localdomain> (raw)
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
next reply other threads:[~2007-08-29 2:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-29 2:18 David Gibson [this message]
2007-08-30 13:51 ` dtc: Fix summary calculation in 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=20070829021851.GA25233@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.