]> granicus.if.org Git - pgbouncer/commitdiff
Fix test exit status
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 19 Sep 2019 08:50:41 +0000 (10:50 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 19 Sep 2019 08:50:41 +0000 (10:50 +0200)
The script was not reporting a total exit status of failure when a
test function would return a non-zero code other than 1.

test/ssl/test.sh
test/test.sh

index 5d03f45576592da9b001dfe5dd096326854e9db9..2f444b6406c86db8e5ebaccf77954ea60554bb65 100755 (executable)
@@ -258,7 +258,7 @@ for test in $testlist
 do
        runtest $test
        status=$?
-       if [ $status -eq 1 ]; then
+       if [ $status -ne 0 ]; then
                total_status=1
        fi
 done
index 8d988c662368ee0540437ccbcd144d4663192148..63a5cce32a37257a38cbf3dbc7cdbaaebfbc83dc 100755 (executable)
@@ -219,6 +219,7 @@ runtest() {
                echo "ok"
        elif [ $status -eq 77 ]; then
                echo "skipped"
+               status=0
        else
                echo "FAILED"
                cat $LOGDIR/$1.log | sed 's/^/# /'
@@ -827,7 +828,7 @@ for test in $testlist
 do
        runtest $test
        status=$?
-       if [ $status -eq 1 ]; then
+       if [ $status -ne 0 ]; then
                total_status=1
        fi
 done