diff options
-rw-r--r-- | .cirrus.yml | 4 | ||||
-rw-r--r-- | test-requirements.txt | 1 | ||||
-rw-r--r-- | tox.ini | 13 |
3 files changed, 11 insertions, 7 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 | diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000..9d26206a --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +avocado-framework<104.0 @@ -4,7 +4,7 @@ envlist = flake8 [testenv] deps = -r{toxinidir}/requirements.txt - avocado-framework<104.0 + -r{toxinidir}/test-requirements.txt python_magic setenv = PYTHONPATH = {toxinidir}/tests @@ -15,6 +15,8 @@ stage_tests = tests/collect_tests \ tests/report_tests \ tests/vendor_tests +foreman_tests = + tests/product_tests/foreman [testenv:flake8] deps = flake8 @@ -29,22 +31,23 @@ basepython = python3 setenv = PYTHONPATH = . commands = - avocado run tests/unittests/ + avocado run tests/unittests [testenv:stageone_tests] basepython = python3 commands = - {[testenv]avocado_cmd} -t stageone {[testenv]stage_tests} + {[testenv]avocado_cmd} -t stageone {posargs:[testenv]stage_tests} [testenv:stagetwo_tests] basepython = python3 +sitepackages = True commands = - {[testenv]avocado_cmd} -t stagetwo {[testenv]stage_tests} + {[testenv]avocado_cmd} -t stagetwo {posargs:[testenv]stage_tests} [testenv:foreman_tests] basepython = python3 commands = - {[testenv]avocado_cmd} -t foreman tests/product_tests/foreman/ + {[testenv]avocado_cmd} -t foreman {posargs:[testenv]foreman_tests} [testenv:nosetests] basepython = python3 |