Browse Source

fix test coverage / codecov.io, use xcode6.4

Thomas Waldmann 9 years ago
parent
commit
5864bd76eb
7 changed files with 22 additions and 6 deletions
  1. 13 0
      .coveragerc
  2. 1 0
      .gitignore
  3. 3 3
      .travis.yml
  4. 1 1
      .travis/install.sh
  5. 2 1
      .travis/upload_coverage.sh
  6. 1 0
      requirements.d/development.txt
  7. 1 1
      tox.ini

+ 13 - 0
.coveragerc

@@ -0,0 +1,13 @@
+[run]
+branch = True
+source = borg
+
+[report]
+exclude_lines =
+    pragma: no cover
+    def __repr__
+    raise AssertionError
+    raise NotImplementedError
+    if 0:
+    if __name__ == .__main__.:
+ignore_errors = True

+ 1 - 0
.gitignore

@@ -20,3 +20,4 @@ docs/usage/*.inc
 borg.build/
 borg.dist/
 borg.exe
+.coverage

+ 3 - 3
.travis.yml

@@ -19,15 +19,15 @@ matrix:
           env: TOXENV=py34
         - language: generic
           os: osx
-          osx_image: beta-xcode6.3
+          osx_image: xcode6.4
           env: TOXENV=py32
         - language: generic
           os: osx
-          osx_image: beta-xcode6.3
+          osx_image: xcode6.4
           env: TOXENV=py33
         - language: generic
           os: osx
-          osx_image: beta-xcode6.3
+          osx_image: xcode6.4
           env: TOXENV=py34
 
 install:

+ 1 - 1
.travis/install.sh

@@ -39,5 +39,5 @@ fi
 
 python -m virtualenv ~/.venv
 source ~/.venv/bin/activate
-pip install tox pytest codecov Cython
+pip install tox pytest pytest-cov codecov Cython
 pip install -e .

+ 2 - 1
.travis/upload_coverage.sh

@@ -6,5 +6,6 @@ set -x
 NO_COVERAGE_TOXENVS=(pep8)
 if ! [[ "${NO_COVERAGE_TOXENVS[*]}" =~ "${TOXENV}" ]]; then
     source ~/.venv/bin/activate
-    bash <(curl -s https://codecov.io/bash) -e TRAVIS_OS_NAME,TOXENV
+    ln .tox/.coverage .coverage
+    codecov -e TRAVIS_OS_NAME,TOXENV
 fi

+ 1 - 0
requirements.d/development.txt

@@ -1,4 +1,5 @@
 tox
 mock
 pytest
+pytest-cov<2.0.0
 Cython

+ 1 - 1
tox.ini

@@ -9,6 +9,6 @@ envlist = py32, py33, py34
 # not really matter, should be just different from the toplevel dir.
 changedir = {toxworkdir}
 deps = -rrequirements.d/development.txt
-commands = py.test --pyargs {posargs:borg.testsuite}
+commands = py.test --cov=borg --pyargs {posargs:borg.testsuite}
 # fakeroot -u needs some env vars:
 passenv = *