Explorar o código

Merge pull request #7701 from heyitsanthony/cov-strip-generated

test: remove generated files from coverage statistics
Anthony Romano %!s(int64=9) %!d(string=hai) anos
pai
achega
d26bdbaf81
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      test

+ 2 - 0
test

@@ -130,6 +130,8 @@ function cov_pass {
 	go test -tags cov -timeout 30m -v ${REPO_PATH}"/e2e" || failed="$failed e2e"
 
 	gocovmerge "$COVERDIR"/*.coverprofile >"$COVERDIR"/cover.out
+	# strip out generated files (using GNU-style sed)
+	sed --in-place '/generated.go/d' "$COVERDIR"/cover.out || true
 
 	# held failures to generate the full coverage file, now fail
 	if [ -n "$failed" ]; then