From b3251fca7934c107c552ccc23618aa9647b679cc Mon Sep 17 00:00:00 2001 From: Steven Hiscocks Date: Fri, 29 Mar 2013 17:16:19 +0000 Subject: [PATCH 1/3] TST: Add support for coveralls for python 2.6 and python 2.7 --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e655e7c1..2095446a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,9 @@ python: - "2.6" - "2.7" install: - - "pip install pyinotify" + - pip install pyinotify + - if [[ $TRAVIS_PYTHON_VERSION == 2.[6-7] ]]; then pip install coveralls; fi script: - - python ./fail2ban-testcases + - if [[ $TRAVIS_PYTHON_VERSION == 2.[6-7] ]]; then coverage python ./fail2ban-testcases; else python ./fail2ban-testcases; fi +after_script: + - if [[ $TRAVIS_PYTHON_VERSION == 2.[6-7] ]]; then coveralls; fi From 92d26e68972c291b085f0f0d85be3b35a02a44b6 Mon Sep 17 00:00:00 2001 From: Steven Hiscocks Date: Fri, 29 Mar 2013 17:22:48 +0000 Subject: [PATCH 2/3] TST+BF: Fix incorrect commands for coveralls support --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2095446a..b3de1358 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ python: - "2.7" install: - pip install pyinotify - - if [[ $TRAVIS_PYTHON_VERSION == 2.[6-7] ]]; then pip install coveralls; fi + - if [[ $TRAVIS_PYTHON_VERSION == 2.[6-7] ]]; then pip install -q coveralls; fi script: - - if [[ $TRAVIS_PYTHON_VERSION == 2.[6-7] ]]; then coverage python ./fail2ban-testcases; else python ./fail2ban-testcases; fi + - if [[ $TRAVIS_PYTHON_VERSION == 2.[6-7] ]]; then coverage run fail2ban-testcases; else python ./fail2ban-testcases; fi after_script: - if [[ $TRAVIS_PYTHON_VERSION == 2.[6-7] ]]; then coveralls; fi From e0e116cb361c4c27d4956fadf9bf8ba9afc23fec Mon Sep 17 00:00:00 2001 From: Steven Hiscocks Date: Fri, 29 Mar 2013 19:09:55 +0000 Subject: [PATCH 3/3] TST: coverage ignore Travis CI python virtual environments --- .coveragerc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.coveragerc b/.coveragerc index 3bffd79a..17fb730b 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,4 +1,4 @@ [run] branch = True -omit = /usr* +omit = /usr* /home/travis/virtualenv/*