Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coverage: reserve coverage across all multiple running #290

Open
xhd2015 opened this issue Nov 23, 2024 · 0 comments
Open

coverage: reserve coverage across all multiple running #290

xhd2015 opened this issue Nov 23, 2024 · 0 comments
Labels

Comments

@xhd2015
Copy link
Owner

xhd2015 commented Nov 23, 2024

According to https://github.com/golang/go/blob/b68f8ca89a2fb6b33d1e78fadc33d1c35693f6b8/src/cmd/go/internal/test/cover.go#L35

func initCoverProfile() {
	// ...
	f, err := os.Create(testCoverProfile)
	// ...
}

Upon every running, the existing coverage profile will be truncated, so test of previous running does not persist.

We may need to create a new profile on every running and merge all profiles together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant