2023-10-05 18:12:18 +02:00
|
|
|
test_dir=tests/functional
|
|
|
|
|
|
|
|
test=$(echo -n "$test" | sed -e "s|^$test_dir/||")
|
|
|
|
|
2022-12-16 02:17:08 +01:00
|
|
|
TESTS_ENVIRONMENT=("TEST_NAME=${test%.*}" 'NIX_REMOTE=')
|
|
|
|
|
|
|
|
: ${BASH:=/usr/bin/env bash}
|
|
|
|
|
|
|
|
init_test () {
|
2023-10-05 18:12:18 +02:00
|
|
|
cd "$test_dir" && env "${TESTS_ENVIRONMENT[@]}" $BASH -e init.sh 2>/dev/null > /dev/null
|
2022-12-16 02:17:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
run_test_proper () {
|
2023-10-05 18:12:18 +02:00
|
|
|
cd "$test_dir/$(dirname $test)" && env "${TESTS_ENVIRONMENT[@]}" $BASH -e $(basename $test)
|
2022-12-16 02:17:08 +01:00
|
|
|
}
|