Move script context e2e tests under a nested 'v2' directory.

And rework scripts to run them in anticipation of new v3 contexts.
This commit is contained in:
KtorZ
2024-08-07 09:12:42 +02:00
parent cab58e5aab
commit 0dec4dc533
31 changed files with 148 additions and 114 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
TESTS=()
for lang in $(ls script_context); do
for interaction in $(find script_context/$lang/validators -type f); do
title=$(basename $interaction)
title="${title%.*}"
cd script_context/$lang
./test.sh $title &
TESTS+=("$title,$lang,$!")
cd - 1>/dev/null
done
done
for args in ${TESTS[@]}; do
IFS=',' read title lang pid <<< "${args}"
wait $pid
code=("$?")
log="script_context/$lang/$title.log"
if [ $code -ne 0 ]; then
echo "=== $title ❌ (code=$code)"
cat $log && rm -f $log
exit $code
else
echo "=== $title ✅"
cat $log && rm -f $log
fi
echo ""
done