Fix CI script for acceptance tests, and have them run in parallel.

This commit is contained in:
KtorZ
2024-03-02 13:34:25 +01:00
parent d698f76e3c
commit 2b8e99a1b8
31 changed files with 45 additions and 37 deletions

View File

@@ -2,11 +2,18 @@
exit_codes=()
for scenario in $(find . -maxdepth 1 -mindepth 1 -regex ".*[0-9]\{3\}" -type d); do
./run $scenario
exit_codes+=("$?")
TESTS=()
for scenario in $(find . -maxdepth 1 -mindepth 1 -type d ! -name script_context); do
./run $scenario &
TESTS+=("$!")
done
for p in ${TESTS[@]}; do
wait $p
exit_codes+=("$?")
done
for interaction in $(find script_context/validators -type f); do
title=$(basename $interaction)
title="${title%.*}"
@@ -17,6 +24,7 @@ done
for code in ${exit_codes[@]}; do
if [ $code -ne 0 ]; then
echo "Some test returned non-zero code: $code"
exit $code
fi
done