You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CI went red on the examples move, and the cause is a cargo behaviour the
move walked straight into: no ordinary test command reliably produces a
*runnable* example.
- `cargo test --all-targets`, which is what CI runs, compiles every
example as a libtest harness — there `--examples` means test them —
so `examples/<name>` never appears and only `examples/<name>-<hash>`
does. Exec'ing that answers `running 0 tests` and compares nothing.
- a plain `cargo test` does build runnable examples, except the four
declared `test = true`: `counted`, `sessionize`, `shards` and
`wordcount`, which is four of the five workers these tests exec.
- `cargo test --test cat_e2e` builds no examples at all.
So `tests/common::example` builds what it needs — one `cargo build
--example <name>`, at most once per name per test binary, in whatever
profile the test itself was built for. By the time a test runs, the
cargo that started it has released the target-directory lock.
CI keeps a build step of its own in front of the test run. Not because
the tests need it now, but so the nine are built once, before anything
runs, rather than by several test binaries discovering the gap at the
same moment and queueing on that lock.
Verified from a clean target directory under `cargo test --workspace`,
`cargo test --workspace --all-targets`, a single `--test` file, and
`--release`.
0 commit comments