tests: add reusable failpoint-enabled go test script for local workflow
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
The current failpoint-enabled unit test guidance in `docs/agents/testing-flow.md` uses an inline shell block. That makes the workflow harder to reuse and awkward to parameterize when a developer needs to pass additional `go test` flags or a different tag set such as `nextgen`.
### Proposed change
- add a reusable script under `tools/check/` to wrap `make failpoint-enable`, `go test`, and `make failpoint-disable`
- accept the package path plus arbitrary `go test` arguments
- default to `-tags=intest,deadlock` when `-tags` is omitted
- allow callers to override tags explicitly, for example `-tags=intest,deadlock,nextgen`
- update `docs/agents/testing-flow.md` to reference the script instead of duplicating the subshell inline
### Benefit
This keeps the failpoint workflow consistent, reduces copy/paste errors, and makes ad hoc local test runs easier to execute.
Contributor guide
Assessment
This issue has not been assessed yet.