There were two problems with the old code: - Since "set -e" is in effect (that is set in scaffold) the run-test script exited immediately if a t-*.sh script failed. This is not nice, as we want the error report that test_failed prints. - The code ran "cd -" between running the t-*.sh script and checking the exit status, so the exit status was lost. (Actually, the exit status was saved in $ERR, but nothing ever looked at $ERR.) Signed-off-by: Per Cederqvist <cederp@xxxxxxxxx> --- regression/run-tests | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/regression/run-tests b/regression/run-tests index a10e796..d39f9ef 100755 --- a/regression/run-tests +++ b/regression/run-tests @@ -55,11 +55,16 @@ function run_test # run the test cd "$REPODIR" > /dev/null - "$REG_DIR/t-$1.sh" 2>&1 > "$LOGFILE" - ERR=$? + if "$REG_DIR/t-$1.sh" 2>&1 > "$LOGFILE" + then + ERR=false + else + ERR=true + fi + cd - > /dev/null - [ $? -ne 0 ] && test_failed + $ERR && test_failed diff -u "t-$1.out" "$LOGFILE" || test_failed echo "done." -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html