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 [1] or when calling the script manually. [1] https://github.com/cockpit-project/cockpit-podman/pull/649
This commit is contained in:
parent
f7239450eb
commit
25768f40dd
@ -1,10 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
# from standard-test-source
|
TESTS="$(realpath $(dirname "$0"))"
|
||||||
SOURCE="$(pwd)/source"
|
if [ -d source ]; then
|
||||||
|
# path for standard-test-source
|
||||||
|
SOURCE="$(pwd)/source"
|
||||||
|
else
|
||||||
|
SOURCE="$(realpath $TESTS/..)"
|
||||||
|
fi
|
||||||
LOGS="$(pwd)/logs"
|
LOGS="$(pwd)/logs"
|
||||||
TESTS="$(pwd)/tests"
|
|
||||||
mkdir -p "$LOGS"
|
mkdir -p "$LOGS"
|
||||||
chmod a+w "$LOGS"
|
chmod a+w "$LOGS"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user