From c156c54dc058dc8bf61fe4c4dfd9d05f802b9679 Mon Sep 17 00:00:00 2001 From: Ryan Beisner Date: Thu, 8 Sep 2016 22:09:46 +0000 Subject: [PATCH] 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: Ie4f916b01506dba1491d0fa5072cd9d4dac66043 --- actions/.keep | 3 +++ lib/.keep | 3 +++ tox.ini | 12 +++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 actions/.keep create mode 100644 lib/.keep diff --git a/actions/.keep b/actions/.keep new file mode 100644 index 0000000..f49b91a --- /dev/null +++ b/actions/.keep @@ -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. diff --git a/lib/.keep b/lib/.keep new file mode 100644 index 0000000..f49b91a --- /dev/null +++ b/lib/.keep @@ -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. diff --git a/tox.ini b/tox.ini index 993c1c0..d8d8d03 100644 --- a/tox.ini +++ b/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] envlist = pep8,py27 skipsdist = True @@ -5,10 +8,13 @@ skipsdist = True [testenv] setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 -passenv = AMULET_* + CHARM_DIR={envdir} + AMULET_SETUP_TIMEOUT=2700 install_command = pip install --allow-unverified python-apt {opts} {packages} commands = ostestr {posargs} +whitelist_externals = juju +passenv = HOME TERM AMULET_* [testenv:py27] basepython = python2.7 @@ -19,7 +25,7 @@ deps = -r{toxinidir}/requirements.txt basepython = python2.7 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = flake8 {posargs} hooks unit_tests tests +commands = flake8 {posargs} hooks unit_tests tests actions lib charm-proof [testenv:venv] @@ -71,4 +77,4 @@ commands = [flake8] ignore = E402,E226 -exclude = hooks/charmhelpers +exclude = */charmhelpers