diff --git a/tox.ini b/tox.ini index 13abdc5da7..c783dd27c3 100644 --- a/tox.ini +++ b/tox.ini @@ -52,6 +52,7 @@ commands = {posargs} [testenv:pep8] basepython = python3 +# NOTE: Due to doc dependencies, we don't share envdir with "venv". # sphinx (precisely Pygments) needs to be installed to make doc8 work properly deps = {[testenv]deps} @@ -67,6 +68,7 @@ commands = [testenv:cover] basepython = python3 +envdir = {toxworkdir}/venv commands = coverage erase coverage run {toxinidir}/manage.py test horizon --settings=horizon.test.settings {posargs} @@ -77,6 +79,7 @@ commands = [testenv:selenium] basepython = python3 +envdir = {toxworkdir}/venv setenv = {[testenv]setenv} WITH_SELENIUM=1 @@ -85,6 +88,7 @@ commands = {[unit_tests]commands} [testenv:selenium-headless] basepython = python3 +envdir = {toxworkdir}/venv setenv = {[testenv]setenv} SELENIUM_HEADLESS=1 @@ -94,6 +98,7 @@ commands = {[unit_tests]commands} [testenv:selenium-phantomjs] basepython = python3 +envdir = {toxworkdir}/venv setenv = {[testenv]setenv} SELENIUM_PHANTOMJS=1 @@ -102,6 +107,7 @@ setenv = commands = {[unit_tests]commands} [testenv:py27integration] +envdir = {toxworkdir}/py27 # Run integration tests only passenv = AVCONV_INSTALLED setenv = @@ -145,32 +151,28 @@ commands = [testenv:releasenotes] basepython = python3 -# There is no need to install horizon. -usedevelop = False -deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} - -r{toxinidir}/doc/requirements.txt +envdir = {toxworkdir}/docs +deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:manage] basepython = python3 -# we don't need to install test-requirements.txt -# modules in requirements.txt are installed due to usedevelop=True -# so 'deps' can be empty. -deps = +envdir = {toxworkdir}/venv commands = {envpython} {toxinidir}/manage.py {posargs} [testenv:runserver] basepython = python3 +envdir = {toxworkdir}/venv commands = {envpython} {toxinidir}/manage.py runserver {posargs} [testenv:bandit] basepython = python3 +envdir = {toxworkdir}/venv commands = bandit -r horizon openstack_auth openstack_dashboard -n5 -x tests -ll [testenv:bandit-baseline] -envdir = {toxworkdir}/bandit +envdir = {toxworkdir}/venv basepython = python3 commands = bandit-baseline -r horizon openstack_auth openstack_dashboard -n5 -x tests -ii -ll