Expand description
A TPX-style external test runner for Buck2, specialized for Rust tests.
Buck2 owns execution and caching. This runner implements buck2’s external
test protocol: it serves the TestExecutor service (receiving one
ExternalRunnerSpec per target), lists each target’s tests via a cacheable
Execute2(Listing), then issues one Execute2(Testing) per discovered test
and reports each result. See DESIGN.md for the full design.
Modules§
- batching
- Adaptive batching: collapsing many tiny per-test actions into fewer
Execute2calls to amortize remote-action overhead. - caching
- The two distinct caching concepts, kept apart so one bit is not written by several places with no precedence.
- cli
- Command-line parsing matching buck2’s exact launch contract.
- config
- db_cli
- duration_
db - environment
- Semantic environment constraints for test execution.
- execution
- Building
Execute2requests for listing and test actions. - executor_
server - The
TestExecutorgRPC service the runner serves to buck2. - ids
- Typed identifiers and the test-name interner for the scheduler’s hot tables.
- listing
- Framework-agnostic test discovery: test case data model and ignored-test policy.
- orchestrator
- Typed client for Buck2’s
TestOrchestrator(andDownwardApi) services. - policy
- Per-target policy axes derived from labels, each an independent typed value.
- proto
- Generated gRPC/protobuf bindings for the Buck2 test-runner protocol.
- result
- Generic (translator-independent) decoding of an
Execute2response, plus the terminal-status, result-identity, log-sink and execution-kind types. - run
- The run lifecycle: wire the two channels, serve the executor, drive the
scheduler, and — on EVERY exit path, including a scheduler panic — report
end_of_test_resultsbefore shutting the executor server down. - scheduler
- The scheduler: the orchestration that turns intake specs into per-test
Execute2calls and reported results, under bounded, fair concurrency. - spec
- The cold, immutable per-target data parsed once from an
ExternalRunnerSpec. - translator
- Test-framework translators: turning a target’s spec into listing/execution commands and decoding harness output into per-test results.
- transport
- gRPC transport over a pre-connected duplex stream.
- variant
- Test execution variant and repetition, the two orthogonal multiplicity
axes buck2’s
Testingstage exposes (variant,repeat_count).