From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 29 Aug 2007 12:18:51 +1000 From: David Gibson To: Jon Loeliger Subject: dtc: Fix summary calculation in testsuite Message-ID: <20070829021851.GA25233@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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