diff --git a/.coveragerc b/.coveragerc index 155e4f638..894c36896 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,2 +1,5 @@ +[run] +omit = etc/*,setup.py,*egg*,.tox/*,barbican/tests/*,*barbican/openstack/* + [report] -omit = etc/*,setup.py,*egg*,.tox/*,barbican/tests/*,barbican/openstack/* +ignore_errors = True diff --git a/tools/hacking.sh b/tools/hacking.sh index 8867cce39..83715641e 100755 --- a/tools/hacking.sh +++ b/tools/hacking.sh @@ -1,3 +1,4 @@ #!/bin/bash -flake8 barbican | tee flake8.log - +set -o pipefail +flake8 barbican | tee flake8.log +exit $? \ No newline at end of file diff --git a/tox.ini b/tox.ini index e367a16d6..55f50224f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,25 @@ [tox] -envlist = pep8,pyflakes,py27 +envlist = pep8,py27 [testenv] setenv = VIRTUAL_ENV={envdir} PYTHONPATH = {toxinidir}/etc/barbican + +# Required for pip 1.5 | Temporally overriding for netaddr - GitHub #392 +#install_command = pip install --allow-external netaddr --allow-unverified netaddr {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -[testenv:pep8] -commands = flake8 - [testenv:py27] commands = nosetests {posargs:--with-xcoverage --all-modules --cover-inclusive --traverse-namespace --with-xunit --cover-package=barbican} [testenv:coverage] commands = coverage html {posargs:--include="*barbican*"} +[testenv:pep8] +commands = {toxinidir}/tools/hacking.sh {posargs} + [flake8] # E711 ignored because of sqlalchemy override of == None # H ignored because it's not H clean