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

Use temporary directory for coverage reports. #647

Merged
merged 1 commit into from
Oct 26, 2021
Merged

Conversation

riannucci
Copy link
Collaborator

This keeps things simple and just uses one temporary directory per
goconvey process to store all coverage reports, with an optional
flag to leak the temporary directory after shutting down the server.

This will allow goconvey to properly report coverage for code
using go modules.

Fixes #618
Fixes #564

goconvey.go Outdated Show resolved Hide resolved
}

done := make(chan os.Signal)
signal.Notify(done, os.Interrupt, syscall.SIGTERM, syscall.SIGINT)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this will compile on Windows. Try GOOS=windows.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This keeps things simple and just uses one temporary directory per
`goconvey` process to store all coverage reports, with an optional
flag to leak the temporary directory after shutting down the server.

This will allow `goconvey` to properly report coverage for code
using go modules.

Fixes #618
Fixes #564
<-done
log.Println("shutting down")
if err := srv.Shutdown(nil); err != nil {
log.Printf("failed to shutdown: %s\n", err)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this Fatalf as well

Copy link

@vadimsht vadimsht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if it works on Windows :)

@riannucci riannucci merged commit badebba into master Oct 26, 2021
@riannucci riannucci deleted the covertempdir branch October 26, 2021 20:11
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

Successfully merging this pull request may close these issues.

Coverage report directory detection confused (by module?)
2 participants