From fd0e492e2fa5626f9288ff5f75b4ff4f9d5cb5fe Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Sat, 23 May 2020 18:01:00 +0200 Subject: [PATCH] travis: Force coverage files to be written in the working dir --- .travis/bin/python3 | 1 - .travis/build.sh | 11 +++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.travis/bin/python3 b/.travis/bin/python3 index 3b3757c..2200037 100755 --- a/.travis/bin/python3 +++ b/.travis/bin/python3 @@ -1,3 +1,2 @@ #!/bin/bash -export COVERAGE_FILE=/tmp/.coverage coverage run --omit='/home/travis/.local/,*/.direnv/*' --parallel-mode "$@" diff --git a/.travis/build.sh b/.travis/build.sh index a41a437..40079bb 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -74,6 +74,9 @@ export PATH="/tmp/lightning/lightningd/:$PATH" # up again. export PATH="$CWD/.travis/bin:$PATH" +# Force coverage to write files in $CWD +export COVERAGE_FILE="$CWD/.coverage" + # Make sure we use the correct python3 wrapper (the one that calls coverage # internally). which python3 @@ -81,11 +84,3 @@ which python3 rm /tmp/.coverage.* .coverage.tmp .coverage || true pytest -vvv --timeout=550 --timeout_method=thread -p no:logging -n 2 - -# Print the coverage files -ls -lha /tmp/.coverage.* - -# Now collect the results in a single file so coveralls finds them -touch .coverage -mv .coverage .coverage.tmp -coverage combine -a /tmp/.coverage.* .coverage.tmp