summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2014-11-23 20:56:21 -0800
committerJeff Quast <contact@jeffquast.com>2014-11-23 20:56:21 -0800
commita94a597cb0888947f71f010f64bb677c05ae430e (patch)
tree5d9719c85218db06ce4673a917409378228736e5
parent6e1897eaf7845644b1e1b7cb5d9bb80889399810 (diff)
downloadpexpect-a94a597cb0888947f71f010f64bb677c05ae430e.tar.gz
Allow coverage to report even on failing tests
This prevents the obscure "artifact dependencies could not be resolved" message in TeamCity and is favored by the more appropriate "such and such tests failed".
-rwxr-xr-xtools/teamcity-runtests.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/teamcity-runtests.sh b/tools/teamcity-runtests.sh
index 5729ce7..b785e03 100755
--- a/tools/teamcity-runtests.sh
+++ b/tools/teamcity-runtests.sh
@@ -32,15 +32,18 @@ pip install --upgrade pytest-cov coverage coveralls pytest-capturelog
# run tests
cd $here/..
+ret=0
py.test \
--cov pexpect \
--cov-config .coveragerc \
--junit-xml=results.${osrel}.py${pyversion}.xml \
--verbose \
- --verbose
+ --verbose \
+ || ret=$?
# combine all coverage to single file, publish as build
# artifact in {pexpect_projdir}/build-output
mkdir -p build-output
coverage combine
mv .coverage build-output/.coverage.${osrel}.py{$pyversion}.$RANDOM.$$
+exit $ret