mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Reduce verbosity of coverage collection.
This commit is contained in:
18
scripts/codecov_upload.sh
Executable file
18
scripts/codecov_upload.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/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 build_cov cov' ./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}
|
||||
@@ -143,7 +143,7 @@ function run {
|
||||
fi
|
||||
|
||||
log_cmd "% ${repro}"
|
||||
"${@}" 2> >(while read -r line; do echo -e "stderr: ${COLOR_MAGENTA}${line}${COLOR_NONE}" >&2; done)
|
||||
"${@}" 2> >(while read -r line; do echo -e "${COLOR_NONE}stderr: ${COLOR_MAGENTA}${line}${COLOR_NONE}">&2; done)
|
||||
local error_code=$?
|
||||
if [ ${error_code} -ne 0 ]; then
|
||||
log_error -e "FAIL: (code:${error_code}):\n % ${repro}"
|
||||
|
||||
Reference in New Issue
Block a user