From e6c7777d15778ed6d486c094dd83b3f667fc588e Mon Sep 17 00:00:00 2001 From: ryardley Date: Tue, 31 Dec 2024 15:04:34 +1100 Subject: [PATCH] Split off prebuild from tests --- tests/integration/fns.sh | 1 - tests/integration/prebuild.sh | 9 +++++++++ tests/integration/test.sh | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 tests/integration/prebuild.sh diff --git a/tests/integration/fns.sh b/tests/integration/fns.sh index a6cfd625..c239e302 100644 --- a/tests/integration/fns.sh +++ b/tests/integration/fns.sh @@ -169,6 +169,5 @@ metallica trap 'cleanup $?' ERR INT TERM $SCRIPT_DIR/lib/clean_folders.sh "$SCRIPT_DIR" -$SCRIPT_DIR/lib/prebuild.sh diff --git a/tests/integration/prebuild.sh b/tests/integration/prebuild.sh new file mode 100755 index 00000000..ada361cb --- /dev/null +++ b/tests/integration/prebuild.sh @@ -0,0 +1,9 @@ + +#!/usr/bin/env bash + +set -eu # Exit immediately if a command exits with a non-zero status + +# This script deliberately does nothing as prebuild has been managed by the outer process +# See test.sh +# +echo "Prebuild finished" diff --git a/tests/integration/test.sh b/tests/integration/test.sh index 7e7ad3fd..992d7143 100755 --- a/tests/integration/test.sh +++ b/tests/integration/test.sh @@ -4,6 +4,10 @@ set -eu # Exit immediately if a command exits with a non-zero status THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +if [[ "$*" != *"--no-prebuild"* ]]; then + "$THIS_DIR/lib/prebuild.sh" +fi + if [ $# -eq 0 ]; then "$THIS_DIR/persist.sh" "$THIS_DIR/base.sh"