etcd/scripts/codecov_upload.sh
Ivan Valdes 5cd14a6031
Revert "tests: temporary disable coverage redesign Go experiment"
With the update to Go 1.22.2, this workaround is no longer needed.

This reverts commit da7ab15f80c06373e03267e11497da71a028a3aa.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-04-04 11:17:06 -07:00

19 lines
518 B
Bash
Executable File

#!/usr/bin/env bash
# Script used to collect and upload test coverage (mostly by travis).
# Usage ./test_coverage_upload.sh [log_file]
set -o pipefail
LOG_FILE=${1:-test-coverage.log}
# We collect the coverage
COVERDIR=covdir PASSES='build cov' ./scripts/test.sh 2>&1 | tee "${LOG_FILE}"
test_success="$?"
# We try to upload whatever we have:
bash <(curl -s https://codecov.io/bash) -f ./covdir/all.coverprofile -cF all || exit 2
# Expose the original status of the test coverage execution.
exit ${test_success}