Fix bashate testing

* add bashate requirement so that it can be actually used;
* use xargs instead of find -exec to get negative results out;
* add pipefail option to know if find failed.

Change-Id: I5d88496608f865335e2ca970de7d9ba19bdcc89b
This commit is contained in:
Yuriy Taraday 2016-09-19 21:34:25 +03:00
parent ce08ec7aad
commit 3009e4dccc
2 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@
hacking<0.11,>=0.10.0
bashate>=0.2 # Apache-2.0
coverage>=3.6
fixtures>=3.0.0 # Apache-2.0/BSD
python-subunit>=0.0.18

View File

@ -16,7 +16,7 @@ commands = python setup.py test --slowest --testr-args='{posargs}'
[testenv:pep8]
whitelist_externals = bash
commands =
bash -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -exec bashate -v \{\} \;"
bash -c "set -o pipefail; find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -print0 | xargs -rt0 bashate -v"
flake8 {posargs}
[testenv:linters]