From a71d64c74fccffb1affe07cda551f6d073c88a88 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 21 Mar 2018 12:16:57 +0100 Subject: [PATCH] all.sh: fix cleanup happening during an out-of-tree build --- tests/scripts/all.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 7caebd5dc..00dc9ca2e 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -147,6 +147,10 @@ EOF # remove built files as well as the cmake cache/config cleanup() { + if [ -n "${MBEDTLS_ROOT_DIR+set}" ]; then + cd "$MBEDTLS_ROOT_DIR" + fi + command make clean # Remove CMake artefacts @@ -857,6 +861,7 @@ msg "test: cmake 'out-of-source' build" make test cd "$MBEDTLS_ROOT_DIR" rm -rf "$OUT_OF_SOURCE_DIR" +unset MBEDTLS_ROOT_DIR