diff options
author | Arif Ali <arif.ali@canonical.com> | 2024-04-24 09:49:50 +0100 |
---|---|---|
committer | Jake Hunsaker <jacob.r.hunsaker@gmail.com> | 2024-04-26 15:23:34 -0400 |
commit | d60a68bdb40e010077d19956d1536526902bd20d (patch) | |
tree | 0962f0b525d370d81f5b1fd508e5aaf7ee569af7 /.cirrus.yml | |
parent | 7f11033c6eb5a2fe7244f0b9d471685909c0ec89 (diff) | |
download | sos-d60a68bdb40e010077d19956d1536526902bd20d.tar.gz |
[tox] Use posargs for the tests
This allows to run specific tests, and not all the tests in one go.
This is especially useful if you're writing a plugin or creating a test
for a specific scenario. Below an example of what would be possible
```
sudo tox -e stagetwo_tests -- tests/report_tests/plugin_tests/openstack/openstack.py
```
This will run stagetwo tests for the specific test, i.e. openstack in
this case
This also fixes the stagetwo tests, so that it picks up the systemd
python libs from the distro environment
Update the installation of avocado-framework from one place, so that we
don't need to change the version in many places. Adding
`test-requirements.txt` to handle this and integrate this with both tox
and Cirrus CI
Signed-off-by: Arif Ali <arif.ali@canonical.com>
Diffstat (limited to '.cirrus.yml')
-rw-r--r-- | .cirrus.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index 33c48068..0d3f9f0f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -148,7 +148,7 @@ deb_build_task: apt -y install devscripts equivs python3-pip mk-build-deps apt -y install ./sosreport-build-deps*.deb - pip3 install "avocado-framework<104.0" --break-system-packages + pip3 install -r test-requirements.txt --break-system-packages main_script: | dpkg-buildpackage -b -us -uc -rfakeroot -m --build-by="noreply@canonical.com" prep_artifacts_script: mv ../*.deb ./sos_cirrus.deb @@ -240,7 +240,7 @@ report_stageone_task: fi PIP_EXTRA="" [[ $(pip3 install --help | grep break-system) ]] && PIP_EXTRA="--break-system-packages" - pip3 install "avocado-framework<104.0" ${PIP_EXTRA} + pip3 install -r test-requirements.txt ${PIP_EXTRA} # run the unittests separately as they require a different PYTHONPATH in # order for the imports to work properly under avocado unittest_script: &unit_test | |