cli
cli
¶
terok-matrix — run a repo's multi-distro test matrix.
The operator-facing entry point: load the repo's matrix.yml, then
walk the selected slots — build every image first (a failed build is recorded, not
fatal, so one run surfaces every distro's problems), run each slot's test
container, and close with the classic PASS/SKIP/FAIL summary.
Teardown (sweep leftover containers, prune dangling image generations)
runs however the walk ends — failure, --build-only, Ctrl-C. Every
rebuild retags the slot images, so a walk that skips teardown strands
the previous multi-GB generation of the whole fleet; only
--keep-dangling opts out, deliberately.
--slots-json exists for CI: a workflow derives its strategy.matrix
from the same matrix.yml the local runs use, so the slot list has a
single home.
DEFAULT_CONFIG = Path('tests/containers/matrix.yml')
module-attribute
¶
EXIT_INTERRUPTED = 130
module-attribute
¶
BOLD = '\x1b[1m' if _TTY else ''
module-attribute
¶
CYAN = '\x1b[1;36m' if _TTY else ''
module-attribute
¶
YELLOW = '\x1b[1;33m' if _TTY else ''
module-attribute
¶
GREEN = '\x1b[1;32m' if _TTY else ''
module-attribute
¶
RED = '\x1b[1;31m' if _TTY else ''
module-attribute
¶
DIM = '\x1b[2m' if _TTY else ''
module-attribute
¶
TAG = '\x1b[2;38;5;67m' if _TTY and '256color' in os.environ.get('TERM', '') else DIM
module-attribute
¶
RESET = '\x1b[0m' if _TTY else ''
module-attribute
¶
main(argv=None)
¶
Run the matrix; exit 1 when any slot failed, 130 after a Ctrl-C.