From ded65775a28ceeb53829ec2bae1bb7a9947f5856 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 6 Dec 2017 15:09:54 +0100 Subject: tests: try to autodetect directory better Ignore mkosi.builddir. In the future we can also add other patterns if necessary. run-intergration-tests.sh is updated to use the new script, and modified to work from arbitrary directory. Follow-up for #7494. --- test/run-integration-tests.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'test/run-integration-tests.sh') diff --git a/test/run-integration-tests.sh b/test/run-integration-tests.sh index 3ece46c771..3a54a8b17c 100755 --- a/test/run-integration-tests.sh +++ b/test/run-integration-tests.sh @@ -1,21 +1,19 @@ #!/bin/bash -e -if ! test -d ../build ; then - echo "Expected build directory in ../build, but couldn't find it." >&2 - exit 1 -fi +BUILD_DIR="$($(dirname "$0")/../tools/find-build-dir.sh)" -ninja -C ../build +ninja -C "$BUILD_DIR" declare -A results RESULT=0 FAILURES=0 +cd "$(dirname "$0")" for TEST in TEST-??-* ; do echo -e "\n--x-- Starting $TEST --x--" set +e - make -C "$TEST" BUILD_DIR=$(pwd)/../build clean setup run + make -C "$TEST" "BUILD_DIR=$BUILD_DIR" clean setup run RESULT=$? set -e echo "--x-- Result of $TEST: $RESULT --x--" -- cgit v1.2.3