From aebcfbb034b5ea17be6437b83528ee9e55f9b949 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 21 Mar 2018 12:17:20 +0100 Subject: [PATCH] all.sh: Verify out-of-tree testing with CMake Run a test case in ssl-opt.sh to validate that testing works in an out-of-tree CMake build. --- tests/scripts/all.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 312ca82c4..a5c460ab3 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -701,6 +701,17 @@ make msg "test: cmake 'out-of-source' build" make test +# Test an SSL option that requires an auxiliary script in test/scripts/. +# Also ensure that there are no error messages such as +# "No such file or directory", which would indicate that some required +# 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 cd "$MBEDTLS_ROOT_DIR" rm -rf "$OUT_OF_SOURCE_DIR" unset MBEDTLS_ROOT_DIR