From a530939fe40f788d070e5593c884381758cf4192 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Thu, 31 Oct 2024 06:46:33 -0700 Subject: [PATCH] Add check for one nix-build-* directory --- tests/functional/check.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/functional/check.sh b/tests/functional/check.sh index bff6b2ec8..b21349288 100755 --- a/tests/functional/check.sh +++ b/tests/functional/check.sh @@ -49,6 +49,10 @@ test_custom_build_dir() { [ "$status" = "100" ] [[ 1 == "$(count "$customBuildDir/nix-build-"*)" ]] local buildDir=("$customBuildDir/nix-build-"*) + if [[ "${#buildDir[@]}" -ne 1 ]]; then + echo "expected one nix-build-* directory, got: ${buildDir[*]}" >&2 + exit 1 + fi if [[ -e ${buildDir[*]}/build ]]; then buildDir[0]="${buildDir[*]}/build" fi