testing: add SignalSuite for capturing signals during tests #2675

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

davecheney commented Jun 30, 2015

This PR adds a SignalSuite which can be used to hook signals, like SIGQUIT,
which is generated by the timeout from the test runner.

The list of signals handled is defined in the testing.Signals variable. This is for documentation purposes, it should not be modified.

The function supplied to SignalSuite.SetUpSuite should not return. If it does, the test suite will be marked as failed unconditionally.

Usage:

   s.SignalSuite.SetUpSuite(c, func(c *gc.C, sig os.Signal) {
           fmt.Fprintf(os.Stderr, "exiting with signal: %v\n", sig)
           os.Exit(1)
   })

davecheney added some commits Jun 30, 2015

testing: add SignalSuite for capturing signals during tests
This PR adds a SignalSuite which can be used to hook signals, like SIGQUIT,
which is generated by the timeout from the test runner.

Usage:

       s.SignalSuite.SetUpSuite(c, func(c *gc.C, sig os.Signal) {
               fmt.Fprintf(os.Stderr, "exiting with signal: %v\n", sig)
               os.Exit(1)
       })
Owner

jameinel commented Jan 19, 2016

Should this be considered outdated and closed? It didn't get a review board link.

@davecheney davecheney closed this Apr 13, 2016

@davecheney davecheney deleted the davecheney:signalsuite branch Apr 13, 2016

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