Skip to main content

Module tiers

Module tiers 

Source
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 test job runs: everything but the system tier.
TIERS
The tiers, cheapest first: the order C4c runs them in.

Functions§

check_lower
lower (the ci-lower profile) 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 tiers partition all. Returns each tier’s size, or every problem found.
check_profiles
The static half: each tier profile exists in nextest_toml, inherits ci and has a non-empty default-filter.
parse_list
The tests a profile selects in cargo nextest list --message-format json output, 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.