test: run _demo/* and _pydemo/*
This commit is contained in:
26
.github/workflows/test_demo.sh
vendored
Normal file
26
.github/workflows/test_demo.sh
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# llgo run subdirectories under _demo and _pydemo
|
||||
total=0
|
||||
failed=0
|
||||
failed_cases=""
|
||||
for d in ./_demo/* ./_pydemo/*; do
|
||||
total=$((total+1))
|
||||
if [ -d "$d" ]; then
|
||||
echo "Testing $d"
|
||||
if ! llgo run -v "$d"; then
|
||||
echo "FAIL"
|
||||
failed=$((failed+1))
|
||||
failed_cases="$failed_cases\n$d"
|
||||
else
|
||||
echo "PASS"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo "=== Done"
|
||||
echo "$((total-failed))/$total tests passed"
|
||||
if [ "$failed" -ne 0 ]; then
|
||||
echo -e "Failed cases:$failed_cases"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user