From 3009e4dcccfdd90c3f85298d15b6e0711ebc3246 Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Mon, 19 Sep 2016 21:34:25 +0300 Subject: [PATCH] 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 --- test-requirements.txt | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index 821a96a9..8b7036c8 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 diff --git a/tox.ini b/tox.ini index 3b1e1fc7..f581bf63 100644 --- a/tox.ini +++ b/tox.ini @@ -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]