diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-15 02:26:21 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-15 02:37:21 +0800 |
| commit | e174bf5983906b0fd5c23041df42287a5f200cfb (patch) | |
| tree | 0278d9c5cda7f08c9bad5394613be30b4711f7eb /docs | |
| parent | 48cfd06560db6155536f45f3a0209289779a134e (diff) | |
refactor: parallelize example builds in test-examples tool
Split test-examples into two phases: build all examples in parallel
first, then run tests serially against pre-built binaries. Abort on any
build failure instead of skipping tests for that example.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/dev/pages/abouts/ci.md | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/dev/pages/abouts/ci.md b/docs/dev/pages/abouts/ci.md index 659a5fc..9f638d7 100644 --- a/docs/dev/pages/abouts/ci.md +++ b/docs/dev/pages/abouts/ci.md @@ -51,7 +51,12 @@ Finally, it runs `cargo fmt` to unify code formatting. Because the refresh tools ### Examples in detail -`--check-examples` runs the `test-examples` tool, which scans `examples/*/test.toml`. Each file contains `[[runs]]` entries declaring the CLI arguments (`input`) and the expected `exit-code` / `result`. The tool builds every example that has a `test.toml` and executes each run against the built binary, so an example that changes its behavior only needs its own `test.toml` updated. +`--check-examples` runs the `test-examples` tool in two phases: + +1. **Build** — every example that has a `test.toml` is built in parallel (one `cargo build` task per example, reusing the shared `.temp/target` cache). +2. **Test** — each `[[runs]]` entry in `examples/*/test.toml` is executed serially against the pre-built binary, asserting the CLI arguments (`input`) and the expected `exit-code` / `result`. + +An example that changes its behavior only needs its own `test.toml` updated. ### Combining steps |
