diff --git a/Makefile b/Makefile index 25da105a38e..4afb673f048 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ test-coverage: .PHONY: upload-coverage-report upload-coverage-report: test-coverage - ./scripts/codecov_upload.sh + COVERDIR=covdir ./scripts/codecov_upload.sh .PHONY: fuzz fuzz: diff --git a/scripts/codecov_upload.sh b/scripts/codecov_upload.sh index 2983310ae08..eeecc0ff4a7 100755 --- a/scripts/codecov_upload.sh +++ b/scripts/codecov_upload.sh @@ -1,9 +1,15 @@ #!/usr/bin/env bash -# Script used to collect and upload test coverage (mostly by travis). -# Usage ./test_coverage_upload.sh [log_file] +# Script used to collect and upload test coverage. set -o pipefail # We try to upload whatever we have: -bash <(curl -s https://codecov.io/bash) -f ./covdir/all.coverprofile -cF all +bash <(curl -s https://codecov.io/bash) -f "${COVERDIR}/all.coverprofile" \ + -cF all \ + -C "${PULL_PULL_SHA}" \ + -r "${REPO_OWNER}/${REPO_NAME}" \ + -P "${PULL_NUMBER}" \ + -b "${BUILD_ID}" \ + -B "${PULL_BASE_REF}" \ + -N "${PULL_BASE_SHA}"