test_automated_install.bats was a single 372-line file running 18 tests serially, which doubled wall-clock CI time compared to the old pytest suite (which used pytest-xdist -n auto for parallelism). Split into three focused files: - test_automated_install.bats — core installer: package manager detection, SELinux config check, fresh install, package cache update (success/failure), dependency installation, meta-package uninstall (7 tests) - test_ftl.bats — FTL architecture detection for all supported arches plus binary installation and version check (9 tests) - test_network.bats — IPv6 address detection (link-local/ULA/GUA precedence) and IP address validation (6 tests) Update run.sh to include the new files and to pass --jobs $(nproc) to BATS when GNU parallel is available, running all files concurrently. This restores the degree of parallelism previously provided by pytest-xdist and brings CI duration back in line with the old suite. Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Recommended way to run tests
Make sure you have Docker and Python w/pip package manager.
From command line all you need to do is:
pip install toxtox
Tox handles setting up a virtual environment for python dependencies, installing dependencies, building the docker images used by tests, and finally running tests. It's an easy way to have travis-ci like build behavior locally.
Alternative py.test method of running tests
You're responsible for setting up your virtual env and dependencies in this situation.
py.test -vv -n auto -m "build_stage"
py.test -vv -n auto -m "not build_stage"
The build_stage tests have to run first to create the docker images, followed by the actual tests which utilize said images. Unless you're changing your dockerfiles you shouldn't have to run the build_stage every time - but it's a good idea to rebuild at least once a day in case the base Docker images or packages change.
How do I debug python?
Highly recommended: Setup PyCharm on a Docker enabled machine. Having a python debugger like PyCharm changes your life if you've never used it :)