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