Code coverage for smoke tests.
Allow non-circle people to build coverage reports.
This commit is contained in:
1 parent
da41604229
commit
00a7490a1d
12 files changed
+211
-14
No files matched your search
+3
-3
@@ -15,12 +15,12 @@ type SignalReceiver interface {
|
||||
|
||||
func SignalHandlerLoop(ss ...SignalReceiver) {
|
||||
sigs := make(chan os.Signal, 1)
|
||||
signal.Notify(sigs, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGUSR1)
|
||||
signal.Notify(sigs, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGUSR1, syscall.SIGTERM)
|
||||
buf := make([]byte, 1<<20)
|
||||
for {
|
||||
switch <-sigs {
|
||||
case syscall.SIGINT:
|
||||
Log.Infof("=== received SIGINT ===\n*** exiting\n")
|
||||
case syscall.SIGINT, syscall.SIGTERM:
|
||||
Log.Infof("=== received SIGINT/SIGTERM ===\n*** exiting\n")
|
||||
for _, subsystem := range ss {
|
||||
subsystem.Stop()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user