[Crosstoolchain-logs] [device-tree-compiler] 133/357: dtc: Fix summary calculation in testsuite

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.

commit 7ca330865e9e4bf0f32a9875a364d00951373999
Author: David Gibson <david at gibson.dropbear.id.au>
Date:   Wed Aug 29 12:18:51 2007 +1000

    dtc: Fix summary calculation in testsuite
    
    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 at gibson.dropbear.id.au>
---
 tests/run_tests.sh | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 381d665..b7cad42 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -15,12 +15,15 @@ run_test () {
     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
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list