fix_: final coverage reports merging (#5384)
This commit is contained in:
parent
bd816f1e29
commit
d00df557c7
|
@ -114,6 +114,8 @@ fi
|
||||||
|
|
||||||
echo -e "${GRN}Testing HEAD:${RST} $(git rev-parse HEAD)"
|
echo -e "${GRN}Testing HEAD:${RST} $(git rev-parse HEAD)"
|
||||||
|
|
||||||
|
rm -rf ./**/*.coverage.out
|
||||||
|
|
||||||
for package in ${UNIT_TEST_PACKAGES}; do
|
for package in ${UNIT_TEST_PACKAGES}; do
|
||||||
for ((i=1; i<=UNIT_TEST_COUNT; i++)); do
|
for ((i=1; i<=UNIT_TEST_COUNT; i++)); do
|
||||||
if ! is_parallelizable "${package}" || [[ "$UNIT_TEST_FAILFAST" == 'true' ]]; then
|
if ! is_parallelizable "${package}" || [[ "$UNIT_TEST_FAILFAST" == 'true' ]]; then
|
||||||
|
@ -132,9 +134,9 @@ for package in ${UNIT_TEST_PACKAGES}; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Gather test coverage results
|
# Gather test coverage results
|
||||||
|
rm -f c.out
|
||||||
echo "mode: atomic" > c.out
|
echo "mode: atomic" > c.out
|
||||||
grep -h -v "^mode:" ./**/*.coverage.out >> c.out
|
grep -r -h -v "^mode:" --include "*.coverage.out" >> c.out
|
||||||
rm -rf ./**/*.coverage.out
|
|
||||||
|
|
||||||
if [[ $UNIT_TEST_REPORT_CODECLIMATE == 'true' ]]; then
|
if [[ $UNIT_TEST_REPORT_CODECLIMATE == 'true' ]]; then
|
||||||
# https://docs.codeclimate.com/docs/jenkins#jenkins-ci-builds
|
# https://docs.codeclimate.com/docs/jenkins#jenkins-ci-builds
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
coverage_file_path="${PACKAGE_DIR}/$(mktemp coverage.out.rerun.XXXXXXXXXX)"
|
coverage_file_path="$(mktemp coverage.out.rerun.XXXXXXXXXX --tmpdir="${PACKAGE_DIR}")"
|
||||||
go test -json \
|
go test -json \
|
||||||
-covermode=atomic \
|
-covermode=atomic \
|
||||||
-coverprofile="${coverage_file_path}" \
|
-coverprofile="${coverage_file_path}" \
|
||||||
|
|
Loading…
Reference in New Issue