From b8e82874907b052be8bbe07d19abc17c048cac1b Mon Sep 17 00:00:00 2001 From: John Vrbanac Date: Thu, 2 Jan 2014 15:16:31 -0600 Subject: [PATCH] Attempting to fix the tox environments * Corrected flake8 environment (running through hacking.sh) * Added exception for netaddr for pip 1.5 * Ignoring no-source errors with coverage Change-Id: I2017946fd0db7c69f6a2d8d0be0fc79f3c5d5439 --- .coveragerc | 5 ++++- tools/hacking.sh | 5 +++-- tox.ini | 11 +++++++---- 3 files changed, 14 insertions(+), 7 deletions(-) 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