From a0f5493eef90cdf9f66b3b817c48e645fc14e005 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 10 Feb 2021 06:46:21 +0100 Subject: [PATCH] tests: Fix browser.sh path detection to be less STI specific Only set `$SOURCE` to ./source/ if that actually exists, which is when it is being called through Standard Test Interface. Provide fallbacks for using FMF or when calling the script manually. --- tests/verify.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/verify.sh b/tests/verify.sh index e91e530..d6fe87a 100755 --- a/tests/verify.sh +++ b/tests/verify.sh @@ -1,10 +1,14 @@ #!/bin/sh set -eux -# from standard-test-source -SOURCE="$(pwd)/source" +TESTS="$(realpath $(dirname "$0"))" +if [ -d source ]; then + # path for standard-test-source + SOURCE="$(pwd)/source" +else + SOURCE="$(realpath $TESTS/..)" +fi LOGS="$(pwd)/logs" -TESTS="$(pwd)/tests" mkdir -p "$LOGS" chmod a+w "$LOGS"