Unit test runner
Usage
/test— test affected packages (from git diff)/test //beacon-chain/sync/...— test a specific target/test //...— test everything (slow)
Steps
Determine targets — if the user gave one, use it; otherwise derive from the diff:
git diff --name-only HEAD | grep '\.go$' | xargs -I{} dirname {} | sort -u | sed 's|^|//|;s|$|/...|'Run:
bazel test <targets> \ --keep_going \ --test_output=errors \ --flaky_test_attempts=3 \ --build_tests_onlyReport:
✅ Passed: X ❌ Failed: Y - //package:test — error summaryFlaky tests that pass on retry are fine.