summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2017-04-21 17:41:30 -0700
committerGitHub <noreply@github.com>2017-04-21 17:41:30 -0700
commit457268571086f921ea1034ec214511047a287ed3 (patch)
treee8b854e8ade5e9133c2d1964704d5f462de0dad9
parentead58cbb9062fab01363e35746e65478acc2dcf5 (diff)
downloadspack-457268571086f921ea1034ec214511047a287ed3.tar.gz
spack-457268571086f921ea1034ec214511047a287ed3.tar.bz2
spack-457268571086f921ea1034ec214511047a287ed3.tar.xz
spack-457268571086f921ea1034ec214511047a287ed3.zip
Coverage for multiple Python versions. (#3951)
Update tests to use codecov for multiple python versions.
-rw-r--r--.travis.yml2
-rwxr-xr-xshare/spack/qa/run-unit-tests4
2 files changed, 4 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index d7bdf9b2ca..60b3b1cc31 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -92,7 +92,7 @@ before_script:
script: share/spack/qa/run-$TEST_SUITE-tests
after_success:
- - if [[ $TEST_SUITE == unit && $TRAVIS_PYTHON_VERSION == 2.7 && $TRAVIS_OS_NAME == "linux" ]]; then codecov --env PY_VERSION; fi
+ - codecov --env PY_VERSION
#=============================================================================
# Notifications
diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests
index d2ce9647af..c266665ccb 100755
--- a/share/spack/qa/run-unit-tests
+++ b/share/spack/qa/run-unit-tests
@@ -42,7 +42,9 @@ spack compilers
spack config get compilers
# Run unit tests with code coverage
-if [[ "$TRAVIS_PYTHON_VERSION" == 2.7 ]]; then
+py_ver=$(python -c 'import platform; print(platform.python_version())')
+if [[ "$py_ver" == 2.7* || "$py_ver" == 3.6* ]];
+then
coverage run bin/spack install -v libdwarf
coverage run bin/spack test "$@" && coverage combine
else