2026-04-16 11:48:37 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
START=$(date +%s)
|
2026-04-17 10:05:31 +02:00
|
|
|
tmp=$(mktemp)
|
|
|
|
|
trap 'rm -f "$tmp"' EXIT
|
2026-04-17 22:20:10 +02:00
|
|
|
if fvm flutter test test/unit/ test/widget/ --coverage --no-pub --reporter expanded >"$tmp" 2>&1; then
|
2026-04-17 10:05:31 +02:00
|
|
|
# Success: show only the summary line
|
|
|
|
|
grep -E "^All [0-9]+ tests passed" "$tmp" || tail -1 "$tmp"
|
|
|
|
|
else
|
|
|
|
|
# Failure: show the full output so the developer sees what broke
|
|
|
|
|
cat "$tmp"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2026-04-16 11:48:37 +02:00
|
|
|
END=$(date +%s)
|
|
|
|
|
echo "test: $((END - START))s"
|