From f7e956c85c5204d253db043128ea4260040e158d Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Sat, 28 Mar 2020 18:56:09 +0100 Subject: [PATCH] component_test_cmake_out_of_source: simplify and fix error handling Remove ssl-opt.err even if it's empty. Call cat unconditionally: it'll have no visible effect if the file is empty. Signed-off-by: Gilles Peskine --- tests/scripts/all.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index f80b8ff1e..5a0ae4b0f 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -2548,11 +2548,10 @@ component_test_cmake_out_of_source () { # file is missing (ssl-opt.sh tolerates the absence of some files so # may exit with status 0 but emit errors). if_build_succeeded ./tests/ssl-opt.sh -f 'Fallback SCSV: beginning of list' 2>ssl-opt.err - if [ -s ssl-opt.err ]; then - cat ssl-opt.err >&2 - record_status [ ! -s ssl-opt.err ] - rm ssl-opt.err - fi + cat ssl-opt.err >&2 + # If ssl-opt.err is non-empty, record an error and keep going. + record_status [ ! -s ssl-opt.err ] + rm ssl-opt.err cd "$MBEDTLS_ROOT_DIR" rm -rf "$OUT_OF_SOURCE_DIR" unset MBEDTLS_ROOT_DIR