tests: fix saferun() return value when TIME is not set
authorJean Privat <jean@pryen.org>
Sun, 2 Nov 2014 16:04:28 +0000 (11:04 -0500)
committerJean Privat <jean@pryen.org>
Mon, 3 Nov 2014 15:02:10 +0000 (10:02 -0500)
Doing stuff after the command execution will temper its return value.

Signed-off-by: Jean Privat <jean@pryen.org>

tests/tests.sh

index 14be6d4..966dee1 100755 (executable)
@@ -74,8 +74,8 @@ saferun()
        if test -n "$TIME"; then
                $TIME -o "$o" $a $TIMEOUT "$@"
        else
-               $TIMEOUT "$@"
                if test -n "$a"; then echo 0 >> "$o"; else echo 0 > "$o"; fi
+               $TIMEOUT "$@"
        fi
 }