[PATCH 05/10] test: Split setup/teardown functions for build and distro tests