diff --git a/hack/make-rules/test.sh b/hack/make-rules/test.sh index de96b83..34aea47 100755 --- a/hack/make-rules/test.sh +++ b/hack/make-rules/test.sh @@ -50,17 +50,16 @@ fi -- "${go_test_opts[@]}" './...' ) -# filter out generated files -sed '/zz_generated/d' "${REPO_ROOT}/bin/${MODE}.cov" > "${REPO_ROOT}/bin/${MODE}-filtered.cov" - # generate cover html -go tool cover -html="${REPO_ROOT}/bin/${MODE}-filtered.cov" -o "${REPO_ROOT}/bin/${MODE}-filtered.html" +go tool cover -html="${REPO_ROOT}/bin/${MODE}.cov" -o "${REPO_ROOT}/bin/${MODE}.html" # if we are in CI, copy to the artifact upload location if [[ -n "${ARTIFACTS:-}" ]]; then cp "bin/${MODE}-junit.xml" "${ARTIFACTS:?}/junit.xml" - cp "${REPO_ROOT}/bin/${MODE}-filtered.cov" "${ARTIFACTS:?}/filtered.cov" - cp "${REPO_ROOT}/bin/${MODE}-filtered.html" "${ARTIFACTS:?}/filtered.html" + # TODO: currently these names are required in $ARTIFACTS in order to render + # in the spyglass view. however we're not filtering anymore + cp "${REPO_ROOT}/bin/${MODE}.cov" "${ARTIFACTS:?}/filtered.cov" + cp "${REPO_ROOT}/bin/${MODE}.html" "${ARTIFACTS:?}/filtered.html" fi # enforce coverage levels if we're running all tests diff --git a/hack/tools/require-coverage/main.go b/hack/tools/require-coverage/main.go index 2e85800..b1d1ab8 100644 --- a/hack/tools/require-coverage/main.go +++ b/hack/tools/require-coverage/main.go @@ -59,7 +59,7 @@ var knownFailingFiles = sets.NewString( func main() { fmt.Println("Checking coverage ...") - profiles, err := cover.ParseProfiles("./../../bin/all-filtered.cov") + profiles, err := cover.ParseProfiles("./../../bin/all.cov") if err != nil { panic(err) }