mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-08 12:45:29 -05:00
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@gibson.dropbear.id.au>
This commit is contained in:
parent
1248237c7e
commit
7ca330865e
1 changed files with 8 additions and 5 deletions
|
|
@ -15,12 +15,15 @@ run_test () {
|
||||||
echo -n "$@: "
|
echo -n "$@: "
|
||||||
if PATH=".:$PATH" $ENV "$@"; then
|
if PATH=".:$PATH" $ENV "$@"; then
|
||||||
tot_pass=$[tot_pass + 1]
|
tot_pass=$[tot_pass + 1]
|
||||||
elif [ "$?" == "1" ]; then
|
|
||||||
tot_config=$[tot_config + 1]
|
|
||||||
elif [ "$?" == "2" ]; then
|
|
||||||
tot_fail=$[tot_fail + 1]
|
|
||||||
else
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue