diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -171,12 +171,28 @@ fails if any of it leaks into the default build. Some tests are gated on the host and skip themselves with a printed note rather than failing: -* `versions::vercmp_matches_the_system_oracle` needs pacman's `vercmp` on `PATH` - and compares the hand-written comparator against it over ~1100 pairs. +* `pkgver::tests::the_live_vercmp_tier_is_recorded_not_silently_absent` needs + pacman's `vercmp` on `PATH` and compares the hand-written comparator against it + over ~1100 pairs. A second test, `vercmp_matches_the_recorded_oracle`, checks + the same ~1100 pairs against a committed table, so the comparator is pinned on + a machine with no pacman at all. * The live kata tier needs `/dev/kvm` and a cluster (`AUR_KATA_API`); the kata rendezvous and TTL logic itself runs everywhere via a real `sandbox-agent` process with no VM. The old real-chroot tier retired with devtools. +### Where a test lives + +A test goes in the module it tests, unless it needs something a unit test cannot +have — the fixture corpus, a database, a real subprocess, a listening socket. +`tests/` is for those, and `src/` holds the rest as `#[cfg(test)] mod tests`. + +That is a rule with a consequence, and the consequence is the reason it is worth +stating: a test outside a module can only reach what the module exports, so every +test that sat in `tests/` while testing something module-private was quietly +keeping that thing `pub`. Moving the test home is what lets the item go private. +`tools/test-surface.py` finds the ones still outstanding and +`tools/test-surface.md` records what is being done about each. + ## Operations ```sh |
