2022-09-29 21:48:48 +00:00
|
|
|
#!/usr/bin/env bash
|
2023-02-17 17:59:48 +00:00
|
|
|
|
2025-12-09 04:09:41 +00:00
|
|
|
# The test should not be run by regular users. This should only be run in CI or by developers.
|
|
|
|
|
if [[ "$CI" != "true" ]]; then
|
|
|
|
|
echo "This script is intended to be run in CI or by developers only."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2023-06-27 01:52:50 +00:00
|
|
|
export REPORT_SELF_HOSTED_ISSUES=0 # will be over-ridden in the relevant test
|
|
|
|
|
|
2023-03-17 20:52:49 +00:00
|
|
|
FORCE_CLEAN=1 "./scripts/reset.sh"
|
2022-09-29 21:48:48 +00:00
|
|
|
fail=0
|
2023-02-17 17:59:48 +00:00
|
|
|
for test_file in _unit-test/*-test.sh; do
|
2025-06-13 23:50:26 +00:00
|
|
|
if [ -n "$1" ] && [ "$1" != "$test_file" ]; then
|
2023-06-27 01:52:50 +00:00
|
|
|
echo "🙊 Skipping $test_file ..."
|
|
|
|
|
continue
|
|
|
|
|
fi
|
2022-10-21 20:46:35 +00:00
|
|
|
echo "🙈 Running $test_file ..."
|
|
|
|
|
$test_file
|
2024-11-07 10:11:07 +00:00
|
|
|
exit_code=$?
|
|
|
|
|
if [ $exit_code != 0 ]; then
|
|
|
|
|
echo fail 👎 with exit code $exit_code
|
2022-10-21 20:46:35 +00:00
|
|
|
fail=1
|
|
|
|
|
fi
|
2022-09-29 21:48:48 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
|
|
exit $fail
|