table of contents
| PKGOS-DH_AUTO_TEST(1) | Debian OpenStack packaging | PKGOS-DH_AUTO_TEST(1) |
NAME¶
pkgos-dh_auto_test - run the unit tests of a Python OpenStack package for every supported Python 3 version
SYNOPSIS¶
pkgos-dh_auto_test [--no-parallel] [--serial] [test-regex...]
DESCRIPTION¶
pkgos-dh_auto_test runs the unit test suite of a Python OpenStack package for every supported Python 3 version, using stestr if a .stestr.conf file is present in the package source tree, or testrepository if a .testr.conf file is present. Tests are run in parallel by default, using the test runner's --parallel option. The output is converted from the subunit format to the usual Python unittest format through subunit2pyunit. If a test suite fails, the output of "pip3 freeze" is displayed, and the script exits with a non-zero return code, so that the package build fails. Extra parameters (for example a test regex) are forwarded verbatim to the test runner. The pkgos.make(7) makefile snippet calls this script from the override_dh_auto_test target of debian/rules when PKGOS_RUN_UNIT_TESTS_AT_BUILD is set to yes in /etc/pkgos/pkgos.conf, which is the default. If debian/tmp/usr/lib/python3/dist-packages exists and PYTHONPATH is empty, that folder is implicitly added to PYTHONPATH, so that tests can run against the dependencies installed by pkgos-dh_auto_install(1) with --in-tmp.
OPTIONS¶
- --no-parallel
- Do not pass the --parallel option to the test runner.
- --serial
- Run the test suite in serial mode, passing --serial to the test runner, and do not pass --parallel.
- test-regex
- Any extra parameters are forwarded verbatim to the test runner, which normally interprets them as a test selection regex, for example 'project_name\.tests\.unit.*'.
ENVIRONMENT¶
- PYTHON3S
- If set, it overrides the list of Python 3 versions to test with, normally obtained through py3versions(1).
EXAMPLES¶
SEE ALSO¶
pkgos-dh_auto_install(1), pkgos-testr(1), py3versions(1), subunit2pyunit(1).
AUTHOR¶
This script and its man page: (c) 2026, Thomas Goirand <zigo@debian.org>, released under the Apache-2.0 license.
| 23 September 2026 | openstack-pkg-tools |