tpt-testkit
RustUnified golden-file, benchmarking, fuzzing, and property-testing infrastructure for the TPT Rust ecosystem.
0 stars0 forks0 watchers
Languages
Rust99.6%Shell0.4%
README
tpt-testkit
Unified testing, benchmarking and fuzzing infrastructure for the TPT ecosystem.
Dev-dependency only. tpt-testkit must never appear in a production dependency
graph. CI enforces this with scripts/check-prod-footprint.sh.
Crates
| Crate | Purpose |
|---|---|
tpt-testkit | Library: golden files, bench, fuzz, suite and property APIs (feature-gated). |
tpt-testkit-macros | Proc macros, e.g. per-file test generation for compatibility suites. |
tpt-testkit-cli | Command-line tool: bench-compare, crash deduplication, corpus tools. |
Using it in a crate
Add it under [dev-dependencies] only:
[dev-dependencies]
tpt-testkit = { git = "https://github.com/tpt-solutions/tpt-testkit", tag = "v0.1.0" }
Feature flags on tpt-testkit: golden (default), bench, fuzz, suite,
property, nostd, platform-isolation.
Development
The toolchain is pinned in rust-toolchain.toml (Rust 1.97.0).
cargo check --workspace
cargo fmt --all --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test --workspace --all-features
bash scripts/check-prod-footprint.sh
cargo deny check
Conventions
unsafeis forbidden everywhere except the isolatedplatform-isolationfeature.- Golden fixtures live in
tests/fixtures/in the calling crate (see docs/golden.md). Regenerate them withTPT_UPDATE_GOLDEN=1. - Benchmarks follow the
area/format/sizenaming scheme and are compared against the PR base commit (see docs/bench.md). - All test and benchmark output must be machine-readable (JSON/CSV) for CI.
License
Licensed under either of MIT or Apache-2.0, at your option.