Expand description
The test-tier probe (crate-hygiene track, C4b, #2940).
Every test in the workspace belongs to exactly one tier (unit, integration,
system), selected by the default-filter of the ci-unit, ci-integration
and ci-system profiles in .config/nextest.toml. check_partition
takes the full test list and each tier’s list and fails when a test is in
none or in more than one. A tier that selects nothing, or an empty full
list, also fails: a probe that parsed nothing must not read as a pass (the
lesson of A4b’s review).
probe gets the lists from cargo nextest list, so the filtersets are
evaluated by nextest itself, not re-implemented here. It needs cargo-nextest
and built test binaries, so CI runs it in the test job, where both exist.
check_profiles is the static half (no build, no nextest): the three tier
profiles exist, inherit ci, and carry a filter.
Constants§
- LOWER_
PROFILE - The profile the Linux
testjob runs: everything but the system tier. - TIERS
- The tiers, cheapest first: the order C4c runs them in.
Functions§
- check_
lower lower(theci-lowerprofile) must be exactly the unit and integration tiers together: the Linux job that runs it then leaves nothing out and runs nothing twice with the system job.- check_
partition - Checks that
tierspartitionall. Returns each tier’s size, or every problem found. - check_
profiles - The static half: each tier profile exists in
nextest_toml, inheritsciand has a non-emptydefault-filter. - parse_
list - The tests a profile selects in
cargo nextest list --message-format jsonoutput, one<binary-id> <test name>string each. Anything that is not that document is an error, never an empty list. - probe
- Lists the whole suite (
ci) and each tier, and checks they partition it.