From 9210f9b0559155c6e99ea9ec1311a1d23dcf186f Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 13 Oct 2024 01:28:40 +0900 Subject: [PATCH] tox: Drop envdir tox now always recreates an env although the env is shared using envdir options. ~~~ $ tox -e genpolicy genpolicy: recreate env because env type changed from {'name': 'genconfig', 'type': 'VirtualEnvRunner'} to {'name': 'genpolicy', 'type': 'VirtualEnvRunner'} ~~~ According to the maintainer of tox, this functionality is not intended to be supported. https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293 Change-Id: Ibda3bf5547b3530f854c667140699ecc8486ee85 --- tox.ini | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tox.ini b/tox.ini index b1796b7921..dba2497b50 100644 --- a/tox.ini +++ b/tox.ini @@ -31,11 +31,9 @@ commands = bash {toxinidir}/tools/unit_tests.sh {toxinidir} {posargs} [testenv:venv] -envdir = {toxworkdir}/venv commands = {posargs} [testenv:pep8] -envdir = {toxworkdir}/linters deps = {[testenv]deps} flake8-import-order==0.12 # LGPLv3 @@ -50,7 +48,6 @@ commands = pylint -j 4 --verbose --rcfile=.pylintrc -f colorized openstack_dashboard openstack_auth horizon [testenv:cover] -envdir = {toxworkdir}/venv allowlist_externals = bash commands = @@ -61,7 +58,6 @@ commands = coverage report --show-missing --skip-covered [testenv:selenium] -envdir = {toxworkdir}/venv setenv = {[testenv]setenv} WITH_SELENIUM=1 @@ -70,7 +66,6 @@ commands = bash {toxinidir}/tools/selenium_tests.sh {toxinidir} {posargs} [testenv:selenium-headless] -envdir = {toxworkdir}/venv setenv = {[testenv]setenv} SELENIUM_HEADLESS=1 @@ -80,7 +75,6 @@ commands = bash {toxinidir}/tools/selenium_tests.sh {toxinidir} {posargs} [testenv:selenium-phantomjs] -envdir = {toxworkdir}/venv setenv = {[testenv]setenv} SELENIUM_PHANTOMJS=1 @@ -90,7 +84,6 @@ commands = bash {toxinidir}/tools/selenium_tests.sh {toxinidir} {posargs} [testenv:integration] -envdir = {toxworkdir}/venv # Run integration tests only passenv = DISPLAY @@ -103,7 +96,6 @@ commands = pytest --ds=openstack_dashboard.test.settings -v -x --junitxml="{toxinidir}/test_reports/integration_test_results.xml" --html="{toxinidir}/test_reports/integration_test_results.html" --self-contained-html {posargs:{toxinidir}/openstack_dashboard/test/integration_tests} [testenv:integration-pytest] -envdir = {toxworkdir}/venv # Run pytest integration tests only passenv = DISPLAY @@ -115,7 +107,6 @@ commands = pytest -v --junitxml="{toxinidir}/test_reports/integration_pytest_results.xml" --html="{toxinidir}/test_reports/integration_pytest_results.html" --self-contained-html {posargs:{toxinidir}/openstack_dashboard/test/selenium/integration} [testenv:ui-pytest] -envdir = {toxworkdir}/venv # Run pytest ui tests only passenv = DISPLAY @@ -164,7 +155,6 @@ commands = doc8 doc/source [testenv:pdf-docs] -envdir = {toxworkdir}/docs deps = {[testenv:docs]deps} allowlist_externals = make @@ -173,35 +163,29 @@ commands = make -C doc/build/pdf [testenv:releasenotes] -envdir = {toxworkdir}/docs deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html doc8 doc/source [testenv:manage] -envdir = {toxworkdir}/venv commands = {envpython} {toxinidir}/manage.py {posargs} [testenv:runserver] -envdir = {toxworkdir}/venv commands = {envpython} {toxinidir}/manage.py collectstatic -v 0 -c --noinput {envpython} {toxinidir}/manage.py runserver -v 0 {posargs} [testenv:translations] -envdir = {toxworkdir}/venv commands = {envpython} {toxinidir}/manage.py extract_messages -v 0 --traceback {envpython} {toxinidir}/manage.py compilemessages -v 0 --traceback [testenv:bandit] -envdir = {toxworkdir}/linters deps = {[testenv:pep8]deps} commands = bandit -r horizon openstack_auth openstack_dashboard -n5 -x tests -ll [testenv:bandit-baseline] -envdir = {toxworkdir}/linters deps = {[testenv:pep8]deps} commands = bandit-baseline -r horizon openstack_auth openstack_dashboard -n5 -x tests -ii -ll