Fix CI script for acceptance tests, and have them run in parallel.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user