From 5cd0a36ced2ac3a2898f83bc25ace5b6687a70eb Mon Sep 17 00:00:00 2001 From: Albert S Date: Mon, 26 Dec 2022 18:27:54 +0100 Subject: [PATCH] test.sh: Fix regression causing status code to be lost The changes in 01c5cbf701ab0b0fa928691c6e16e69d13732f3f did not take into account that "tee" would change the exit code. Use a protable alternative to &>> now. --- test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test.sh b/test.sh index fb71c46..b859247 100755 --- a/test.sh +++ b/test.sh @@ -52,7 +52,8 @@ runtest() echo -n "Running $testname... " #exit $? to suppress shell message like "./test.sh: line 18: pid Bad system call" - (./$testbin "$testname" || exit $?) 2>&1 | tee 1>/dev/null -a "${test_log_file}" + (./$testbin "$testname" || exit $?) >> "${test_log_file}" 2>&1 + ret=$? SUCCESS="no" if [ $ret -eq 0 ] ; then