summaryrefslogtreecommitdiff
path: root/tools/travis-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/travis-test.sh')
-rwxr-xr-xtools/travis-test.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/travis-test.sh b/tools/travis-test.sh
index b99866f0d..11863b5fe 100755
--- a/tools/travis-test.sh
+++ b/tools/travis-test.sh
@@ -105,6 +105,11 @@ run_test()
export PYTHONPATH=$PWD
fi
+ if [ -n "$RUN_COVERAGE" ]; then
+ pip install pytest-cov
+ COVERAGE_FLAG=--coverage
+ fi
+
# We change directories to make sure that python won't find the copy
# of numpy in the source directory.
mkdir -p empty
@@ -113,10 +118,17 @@ run_test()
"import os; import numpy; print(os.path.dirname(numpy.__file__))")
export PYTHONWARNINGS=default
if [ -n "$RUN_FULL_TESTS" ]; then
- $PYTHON ../tools/test-installed-numpy.py -v --mode=full
+ export PYTHONWARNINGS="ignore::DeprecationWarning:virtualenv"
+ $PYTHON ../tools/test-installed-numpy.py -v --mode=full $COVERAGE_FLAG
else
$PYTHON ../tools/test-installed-numpy.py -v
fi
+
+ if [ -n "$RUN_COVERAGE" ]; then
+ # Upload coverage files to codecov
+ bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy
+ fi
+
if [ -n "$USE_ASV" ]; then
pushd ../benchmarks
$PYTHON `which asv` machine --machine travis
@@ -181,4 +193,3 @@ else
setup_base
run_test
fi
-