- Add lcov to nix flake (required for flutter --merge-coverage) - stalwart-dev/test.sh: collect and merge coverage when unit baseline exists - run_unit_tests.sh: remove inline coverage check (now in dedicated task) - Taskfile: add coverage task; check runs test → integration → coverage sequentially so the gate sees combined unit + integration data - check-fast (pre-commit) omits coverage gate since integration tests don't run there; full gate runs only in task check - Drop two untestable fake-only tests (UID-validity reset, malformed envelope) - Coverage threshold restored to 80% (84% with merged data) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
444 B
Bash
Executable File
16 lines
444 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
START=$(date +%s)
|
|
tmp=$(mktemp)
|
|
trap 'rm -f "$tmp"' EXIT
|
|
if fvm flutter test test/unit/ test/widget/ --coverage --no-pub --reporter expanded >"$tmp" 2>&1; then
|
|
# 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
|
|
END=$(date +%s)
|
|
echo "test: $((END - START))s"
|