Skip to content

coverage: reserve coverage across all multiple running #290

Open
@xhd2015

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions