test: split the slowest test files #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "test-speed"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
make testtook 6.2 s on a 32-CPU host. The runner runs one job pertest file, so the slowest file sets the wall time, and
test_custom_image.shalone took 6.1 s, withtest_install.shnext at3.8 s. The suite had also never been checked against the rule of one
test per behavior at each level.
What changed
failures, naming, shared) and the install tests as five (cli, engine,
builds, publication, reinstall), each family's helpers in one sourced
*_helpers.sh. Every test body moved byte-for-byte and keeps itsrelative order.
make testnow finishes in about 3.2 s, bounded bytest_runtime.sh(2.6 s alone).Codex first-run test that checked for no env file or state entry. Its
one extra check, that the state folder holds no seeded entry, moved
into the first-run state test, renamed to say it checks for only
those directories. 327 tests remain, from 328.
docs/adding-a-client.mdpoints at thetest_install_*.shfiles andat
assert_publishedininstall_helpers.shfor staged adapters.The runner, harness, stubs,
maketargets, andTESTS/FILTERselection are unchanged.
How to verify
make testpasses and takes about 3.2 s; onmasterit takes about6.2 s.
make test TESTS=custom_image_sharedandmake test TESTS=install_clirun one part each.^test_functions fromgit show master:tests/integration/test_custom_image.shand fromtests/integration/test_custom_image_*.shand compare (same forinstall).
Already run on the tip:
make lint,.agents/hooks/shellcheck.sh repo(50 files clean),
make test(327 tests, 0 failures; 3166, 3170,3179 ms), and lint plus tests on every commit during the fold. The e2e
gate was not run; nothing it covers changed.
Considerations
The 3.2 s figure sits close to the noise of a shared host; at a load
average near 10 the same suite took 3.3 s. Further gains would come
from splitting
test_runtime.shandtest_identity.shor from makingeach launcher run cheaper, both left out. A review finding that one
header line in
install_helpers.shruns to 85 characters was set asideas low.