Skip to content

Commit

Permalink
Adops recipe to avoid outdated tox dependecies
Browse files Browse the repository at this point in the history
Applies official workaround indicated by tox core maintainers for
avoiding tox-dev/tox#149 which allowed
tox to run with without updating dependencies declared in
external files.

Depends-On: https://review.openstack.org/#/c/617145/
Change-Id: I358b80d183a2667a04cfaac2054e101a9d7454ed
  • Loading branch information
ssbarnea committed Nov 11, 2018
1 parent 2854cae commit 4f1fd66
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[tox]
minversion = 2.2
minversion = 3.2.1
envlist = linters, docs, py34, py35, py36, py27, cover
skip_missing_interpreters = true
# custom vars (no meaning to tox)
install_test_deps = pip install -q -r test-requirements.txt

# plugin to workaround https://github.com/tox-dev/tox/issues/149
# where tox fails to update already existing virtualenvs
tox_pip_extensions_ext_venv_update = true
requires = tox-pip-extensions

[testenv]
setenv =
Expand All @@ -12,12 +15,13 @@ setenv =
SUBUNIT_FORMATTER=tee testr_subunit_log
VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install {opts} {packages}
# cleanup is needed mostly for dev environmnts and assures that if dev
# is switching branch, no lefovers will impact execution.
# No git commands here because test should run even from a source archive.
deps =
-rrequirements.txt
-rtest-requirements.txt
commands =
{[tox]install_test_deps}
- find . -type f -name "*.pyc" -delete
- find . -type d -name "__pycache__" -delete
# test that we can call jjb using both variants with same results
Expand All @@ -29,7 +33,6 @@ whitelist_externals =

[testenv:tips]
# tests what happens with unreleased version of dependencies, like python-jenkins
install_command = pip install -U {opts} {packages}
commands =
bash -c "if [ -d {toxinidir}/../python-jenkins ]; then \
pip install -q -U -e 'git+file://{toxinidir}/../python-jenkins#egg=python-jenkins' ; else \
Expand All @@ -41,7 +44,6 @@ setenv =
{[testenv]setenv}
PYTHON=coverage run --source jenkins_jobs --parallel-mode
commands =
{[tox]install_test_deps}
stestr run {posargs}
coverage combine
coverage html -d cover
Expand All @@ -50,7 +52,6 @@ commands =
[testenv:linters]
basepython = python3
commands =
{[tox]install_test_deps}
python -m pre_commit run --all

# points to linters, kept only for developer convenience
Expand All @@ -73,7 +74,6 @@ commands = jenkins-jobs test -o .test/new/out/ .test/new/config/

[testenv:docs]
commands =
{[tox]install_test_deps}
python setup.py build_sphinx {posargs}

[testenv:docs-linkcheck]
Expand Down

0 comments on commit 4f1fd66

Please sign in to comment.