Avoid pollution and false positives with tox.ini
- updated testenv:build to aim to a tmp build directory - added missing env - removing sitepackages in tox.ini to avoid test env pollution - skip_missing_interpreters in tox.ini set to False to avoid false positives by skipping missing interpreters. Change-Id: I8d5af206e2af881013b1f78f7cc913036e6b23c2
This commit is contained in:
parent
302f05564c
commit
77ab7463ed
41
tox.ini
41
tox.ini
@ -2,6 +2,10 @@
|
|||||||
skipsdist = True
|
skipsdist = True
|
||||||
envlist = pep8
|
envlist = pep8
|
||||||
toxworkdir = /tmp/tox
|
toxworkdir = /tmp/tox
|
||||||
|
# NOTE(beisner): Avoid build/test env pollution by not enabling sitepackages.
|
||||||
|
sitepackages = False
|
||||||
|
# NOTE(beisner): Avoid false positives by not skipping missing interpreters.
|
||||||
|
skip_missing_interpreters = False
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
@ -17,15 +21,52 @@ deps =
|
|||||||
whitelist_externals = /bin/true /bin/echo /bin/mkdir
|
whitelist_externals = /bin/true /bin/echo /bin/mkdir
|
||||||
|
|
||||||
[testenv:build]
|
[testenv:build]
|
||||||
|
# ``charm build`` refuses to output to a subdirectory to the source tree
|
||||||
|
# The gate check will look for and validate the built artifacts in the source
|
||||||
|
# tree.
|
||||||
|
# Build the artifats under /tmp and link back to source directory to alleviate.
|
||||||
|
basepython = python3
|
||||||
commands =
|
commands =
|
||||||
/bin/echo 'WARNING: *build* target is for testing only.'
|
/bin/echo 'WARNING: *build* target is for testing only.'
|
||||||
/bin/mkdir -p {envdir}/tmp
|
/bin/mkdir -p {envdir}/tmp
|
||||||
charm-build --log-level DEBUG -o {envdir}/tmp/build .
|
charm-build --log-level DEBUG -o {envdir}/tmp/build .
|
||||||
|
/bin/ln -s {envdir}/tmp/build/builds {envdir}/tmp/build/trusty
|
||||||
|
/bin/ln -s {envdir}/tmp/build {toxinidir}/build
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
|
[testenv:py27]
|
||||||
|
basepython = python2.7
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
# TODO: Need to write unit tests then remove the following command.
|
||||||
|
commands = /bin/true
|
||||||
|
|
||||||
|
[testenv:py34]
|
||||||
|
basepython = python3.4
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
# TODO: Need to write unit tests then remove the following command.
|
||||||
|
commands = /bin/true
|
||||||
|
|
||||||
|
[testenv:py35]
|
||||||
|
basepython = python3.5
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
# TODO: Need to write unit tests then remove the following command.
|
||||||
|
commands = /bin/true
|
||||||
|
|
||||||
|
[testenv:py36]
|
||||||
|
basepython = python3.6
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
# TODO: Need to write unit tests then remove the following command.
|
||||||
|
commands = /bin/true
|
||||||
|
|
||||||
|
[testenv:py37]
|
||||||
|
basepython = python3.7
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
# TODO: Need to write unit tests then remove the following command.
|
||||||
|
commands = /bin/true
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
commands = flake8 --ignore=E402 actions/ reactive/
|
commands = flake8 --ignore=E402 actions/ reactive/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user