diff --git a/_assets/scripts/run_unit_tests.sh b/_assets/scripts/run_unit_tests.sh index b08e5f23c..d3c69f9b0 100755 --- a/_assets/scripts/run_unit_tests.sh +++ b/_assets/scripts/run_unit_tests.sh @@ -135,8 +135,7 @@ done # Gather test coverage results rm -f c.out -echo "mode: atomic" > c.out -grep -r -h -v "^mode:" --include "*.coverage.out" >> c.out +go run ./cmd/test-coverage-utils/gocovmerge.go $(find -iname "*.coverage.out") >> c.out if [[ $UNIT_TEST_REPORT_CODECLIMATE == 'true' ]]; then # https://docs.codeclimate.com/docs/jenkins#jenkins-ci-builds diff --git a/_assets/scripts/test-with-coverage.sh b/_assets/scripts/test-with-coverage.sh index d1f3b8519..19cf34175 100755 --- a/_assets/scripts/test-with-coverage.sh +++ b/_assets/scripts/test-with-coverage.sh @@ -4,4 +4,5 @@ coverage_file_path="$(mktemp coverage.out.rerun.XXXXXXXXXX --tmpdir="${PACKAGE_D go test -json \ -covermode=atomic \ -coverprofile="${coverage_file_path}" \ + -coverpkg ./... \ "$@"