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. Also create empty dirs with .keep files where necessary. Some classic charms have actions and/or lib dirs, and some do not. In all classic charms, flake will now check those dirs to ensure lint coverage of existing or future content. Change-Id: I23cfd47fcee90678b4ba818ddc1d9ace4edd54f3
This commit is contained in:
parent
33ebb858c5
commit
88bd5777cf
3
lib/.keep
Normal file
3
lib/.keep
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
This file was created by release-tools to ensure that this empty
|
||||||
|
directory is preserved in vcs re: lint check definitions in global
|
||||||
|
tox.ini files. This file can be removed if/when this dir is actually in use.
|
11
tox.ini
11
tox.ini
@ -1,3 +1,6 @@
|
|||||||
|
# Classic charm: ./tox.ini
|
||||||
|
# This file is managed centrally by release-tools and should not be modified
|
||||||
|
# within individual charm repos.
|
||||||
[tox]
|
[tox]
|
||||||
envlist = pep8,py27
|
envlist = pep8,py27
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
@ -5,11 +8,13 @@ skipsdist = True
|
|||||||
[testenv]
|
[testenv]
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
PYTHONHASHSEED=0
|
PYTHONHASHSEED=0
|
||||||
|
CHARM_DIR={envdir}
|
||||||
AMULET_SETUP_TIMEOUT=2700
|
AMULET_SETUP_TIMEOUT=2700
|
||||||
passenv = HOME TERM AMULET_HTTP_PROXY AMULET_OS_VIP
|
|
||||||
install_command =
|
install_command =
|
||||||
pip install --allow-unverified python-apt {opts} {packages}
|
pip install --allow-unverified python-apt {opts} {packages}
|
||||||
commands = ostestr {posargs}
|
commands = ostestr {posargs}
|
||||||
|
whitelist_externals = juju
|
||||||
|
passenv = HOME TERM AMULET_*
|
||||||
|
|
||||||
[testenv:py27]
|
[testenv:py27]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
@ -20,7 +25,7 @@ deps = -r{toxinidir}/requirements.txt
|
|||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands = flake8 {posargs} --exclude */charmhelpers hooks unit_tests tests actions
|
commands = flake8 {posargs} hooks unit_tests tests actions lib
|
||||||
charm-proof
|
charm-proof
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
@ -72,4 +77,4 @@ commands =
|
|||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E402,E226
|
ignore = E402,E226
|
||||||
exclude = hooks/charmhelpers
|
exclude = */charmhelpers
|
||||||
|
Loading…
Reference in New Issue
Block a user