Commit 8ee01a27 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 39b3d8c7
......@@ -92,7 +92,7 @@ func routeEvent(event interface{}) (stream string) {
// verify calls tracetest.Verify on f with first preparing tracing setup and events delivery.
// It also verifies that tracetest detects errors as expected.
func verify(t *testing.T, f func(t *tracetest.T), targvExtra ...string) {
// XXX t.Helper() ?
t.Helper()
verifyInSubprocess(t, func (t *testing.T) {
tracetest.Verify(t, func(t *tracetest.T) {
// setup tracing to deliver trace events to t.
......@@ -185,13 +185,16 @@ func verifyInSubprocess(t *testing.T, f func(t *testing.T), targvExtra ...string
cmd.Env = append(os.Environ(), "TRACETEST_EX_VERIFY_IN_SUBPROCESS=1")
bout, err := cmd.CombinedOutput()
out := string(bout)
e, ok := err.(*exec.ExitError)
if !ok {
// e.g. could not respawn at all
t.Log(out)
t.Fatal(err)
ecode := 0
if err != nil {
e, ok := err.(*exec.ExitError)
if !ok {
// e.g. could not respawn at all
t.Log(out)
t.Fatal(err)
}
ecode = e.ExitCode()
}
ecode := e.ExitCode()
bad := ""
badf := func(format string, argv ...interface{}) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment