Update tox.ini files from release-tools gold copy

All OpenStack Charms now contain identical tox.ini files,
not to be modified or made unique within each charm repo.

This is to ensure consistency across charm repos in tox
target naming, approach and purpose, also giving the
charm dev and test experience additional consistency.

Change-Id: Ie3752edbe5fc9518e2d31ea27e805d2812e1b76b
This commit is contained in:
Ryan Beisner 2016-09-06 22:02:23 +00:00
parent 5a28e39ff6
commit 068a29eccf
2 changed files with 50 additions and 40 deletions

View File

@ -1,41 +1,53 @@
# Source charm: ./src/tox.ini
# This file is managed centrally by release-tools and should not be modified
# within individual charm repos.
[tox]
skipsdist = True
envlist = pep8
skipsdist = True
[testenv]
sitepackages = False
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
TERM=linux
INTERFACE_PATH={toxinidir}/interfaces
LAYER_PATH={toxinidir}/layers
JUJU_REPOSITORY={toxinidir}/build
passenv = http_proxy https_proxy
AMULET_SETUP_TIMEOUT=2700
whitelist_externals = juju
passenv = HOME TERM AMULET_*
deps = -r{toxinidir}/test-requirements.txt
install_command =
pip install --allow-unverified python-apt {opts} {packages}
commands = ostestr {posargs}
[testenv:py27]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
[testenv:py34]
basepython = python3.4
deps = -r{toxinidir}/test-requirements.txt
[testenv:py35]
basepython = python3.5
deps = -r{toxinidir}/test-requirements.txt
[testenv:pep8]
basepython = python2.7
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = flake8 {posargs} hooks unit_tests tests actions
charm-proof
commands = charm-proof
[testenv:func27-noop]
# DRY RUN - For Debug
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy
[testenv:func27]
# Run all gate tests which are +x (expected to always pass)
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy
[testenv:func27-smoke]
# Run a specific test as an Amulet smoke test (expected to always pass)
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json gate-basic-xenial-mitaka --no-destroy
[testenv:func27-dfs]
# Run all deploy-from-source tests which are +x (may not always pass!)
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dfs-*" --no-destroy
[testenv:func27-dev]
# Run all development test targets which are +x (may not always pass!)
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy
[testenv:venv]
commands = {posargs}
[flake8]
ignore = E402

24
tox.ini
View File

@ -1,31 +1,28 @@
# Source charm: ./tox.ini
# This file is managed centrally by release-tools and should not be modified
# within individual charm repos.
[tox]
skipsdist = True
envlist = pep8
envlist = pep8,py34,py35
skip_missing_interpreters = True
[testenv]
sitepackages = False
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
TERM=linux
INTERFACE_PATH={toxinidir}/interfaces
LAYER_PATH={toxinidir}/layers
INTERFACE_PATH={toxinidir}/interfaces
JUJU_REPOSITORY={toxinidir}/build
passenv = http_proxy https_proxy
install_command =
pip install --allow-unverified python-apt {opts} {packages}
commands = ostestr {posargs}
pip install {opts} {packages}
deps =
-r{toxinidir}/requirements.txt
[testenv:build]
basepython = python2.7
commands =
charm-build --log-level DEBUG -o {toxinidir}/build src
deps = -r{toxinidir}/requirements.txt
[testenv:py27]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
commands = ostestr {posargs}
charm-build --log-level DEBUG -o {toxinidir}/build src {posargs}
[testenv:py34]
basepython = python3.4
@ -46,4 +43,5 @@ commands = flake8 {posargs} src unit_tests
commands = {posargs}
[flake8]
ignore = E402,E226
# E402 ignore necessary for path append before sys module import in actions
ignore = E402