diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2013-03-18 11:46:20 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2013-03-18 11:46:20 +0100 |
commit | 5d76cee187ea6f1443c6afd0d1cf99f3555304ef (patch) | |
tree | 3f9f117541a4c2b87620dbc305a2962a60fdf422 /test | |
parent | f91bd741d223395cc3b1a609459e7d7226916e86 (diff) |
test/integration/framework: use EXIT_CODE to be consistent with the run-tests code
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/framework | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/integration/framework b/test/integration/framework index cdaa20627..4a70573c8 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1,6 +1,6 @@ #!/bin/sh -- # no runable script, just for vi -TESTFAILURES=0 +EXIT_CODE=0 # we all like colorful messages if expr match "$(readlink -f /proc/$$/fd/1)" '/dev/pts/[0-9]\+' > /dev/null && \ @@ -38,7 +38,7 @@ msgtest() { } msgpass() { echo "${CPASS}PASS${CNORMAL}" >&2; } msgskip() { echo "${CWARNING}SKIP${CNORMAL}" >&2; } -msgfail() { echo "${CFAIL}FAIL${CNORMAL}" >&2; TESTFAILURES=$((TESTFAILURES+1)); } +msgfail() { echo "${CFAIL}FAIL${CNORMAL}" >&2; EXIT_CODE=$((EXIT_CODE+1)); } # enable / disable Debugging MSGLEVEL=${MSGLEVEL:-3} @@ -118,10 +118,10 @@ gdb() { exitwithstatus() { # error if we about to overflow, but ... # "255 failures ought to be enough for everybody" - if [ $TESTFAILURES -gt 255 ]; then - msgdie "Total failure count $TESTFAILURES too big" + if [ $EXIT_CODE -gt 255 ]; then + msgdie "Total failure count $EXIT_CODE too big" fi - exit $((TESTFAILURES <= 255 ? TESTFAILURES : 255)); + exit $((EXIT_CODE <= 255 ? EXIT_CODE : 255)); } addtrap() { |