Test

Run Prysm unit tests with Bazel for affected packages, or a given target.

offchainlabs 0462591 825 B Updated

File contents

Unit test runner

Usage

  • /test — test affected packages (from git diff)
  • /test //beacon-chain/sync/... — test a specific target
  • /test //... — test everything (slow)

Steps

  1. 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|$|/...|'
    
  2. Run:

    bazel test <targets> \
      --keep_going \
      --test_output=errors \
      --flaky_test_attempts=3 \
      --build_tests_only
    
  3. Report:

    ✅ Passed: X
    ❌ Failed: Y
      - //package:test — error summary
    

    Flaky tests that pass on retry are fine.

offchainlabs/prysm/tree/main/.agents/skills/test commit 0462591c82

Frequently asked questions

npx skillmds@latest add offchainlabs/test