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

Using -coverprofile leads to incomplete coverage data #30

Closed
CubicrootXYZ opened this issue Sep 13, 2024 · 1 comment
Closed

Using -coverprofile leads to incomplete coverage data #30

CubicrootXYZ opened this issue Sep 13, 2024 · 1 comment

Comments

@CubicrootXYZ
Copy link
Contributor

Specifying the -coverprofile flag leads to a coverage output that only contains coverage of the last tested package.

I'd expect to see coverage for all packages included in the tests. It seems like gotesplit runs multiple go test runs under the hood overwriting the coverprofile file.

Command I used:

gotesplit -total=3 -index=1 ./... -- -v -race -covermode=atomic -cover -coverprofile=coverage.tmp > report.tmp

I can clearly see that report.tmp contains tests covering files not part of coverage.tmp.

@CubicrootXYZ
Copy link
Contributor Author

resolved with #31

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

No branches or pull requests

1 participant