Skip to content

Commit

Permalink
temp commit
Browse files Browse the repository at this point in the history
  • Loading branch information
srm09 committed Jan 4, 2024
1 parent 7c355e9 commit 3623ed4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hack/test-unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ go test "${GO_TEST_FLAGS_NORACE[@]+"${GO_TEST_FLAGS_NORACE[@]}"}" \

# Merge the race/norace code coverage files.
if [ -n "${COVERAGE_FILE:-}" ]; then
# Removing coverage for generated code
TMP_API_COVERAGE_FILE="$(mktemp)"
mv "${API_COVERAGE_FILE}" "${TMP_API_COVERAGE_FILE}"
cat "${TMP_API_COVERAGE_FILE}" | grep -v "zz_generated*" > "${API_COVERAGE_FILE}"

TMP_COVERAGE_FILE="$(mktemp)"
mv "${COVERAGE_FILE}" "${TMP_COVERAGE_FILE}"
gocovmerge "${API_COVERAGE_FILE}" "${TMP_COVERAGE_FILE}" "${COVERAGE_FILE_NORACE}" >"${COVERAGE_FILE}"
rm -f "${API_COVERAGE_FILE}" "${TMP_COVERAGE_FILE}" "${COVERAGE_FILE_NORACE}"
rm -f "${API_COVERAGE_FILE}" "${TMP_API_COVERAGE_FILE}" "${TMP_COVERAGE_FILE}" "${COVERAGE_FILE_NORACE}"
fi

0 comments on commit 3623ed4

Please sign in to comment.