-
Notifications
You must be signed in to change notification settings - Fork 555
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
Conversation
} | ||
|
||
done := make(chan os.Signal) | ||
signal.Notify(done, os.Interrupt, syscall.SIGTERM, syscall.SIGINT) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprisingly, it does exist: https://cs.opensource.google/go/go/+/master:src/syscall/types_windows.go;l=64?q=SIGTERM&ss=go%2Fgo:src%2Fsyscall%2F
Though I believe its just a noop
bf84fcd
to
385d056
Compare
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
385d056
to
180ccef
Compare
<-done | ||
log.Println("shutting down") | ||
if err := srv.Shutdown(nil); err != nil { | ||
log.Printf("failed to shutdown: %s\n", err) |
There was a problem hiding this comment.
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
There was a problem hiding this 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 :)
This keeps things simple and just uses one temporary directory per
goconvey
process to store all coverage reports, with an optionalflag to leak the temporary directory after shutting down the server.
This will allow
goconvey
to properly report coverage for codeusing go modules.
Fixes #618
Fixes #564