don't filter out generated files

current generated files don't have statements anyhow, only pre-computed variables / constants
This commit is contained in:
Benjamin Elder 2023-03-15 01:03:50 -07:00
parent 99ba64dc3a
commit 5652b0e4fe
2 changed files with 6 additions and 7 deletions

View File

@ -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

View File

@ -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)
}