File tree Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -33,29 +33,11 @@ func execInSubprocess(t *testing.T, f func(t *testing.T)) {
3333 cmd .Env = []string {subprocessEnvKey + "=1" }
3434 cmd .Stdin = os .Stdin
3535
36- var b strings.Builder
37- cmd .Stdout = & b
38- cmd .Stderr = & b
39-
40- err := cmd .Start ()
36+ out , err := cmd .CombinedOutput ()
37+ t .Logf ("%s" , out )
4138 if err != nil {
42- t .Logf ("\n %s" , b .String ())
43- t .Error ("failed to spawn test in sub-process" , err )
44- t .FailNow ()
45- }
46-
47- err = cmd .Wait ()
48- if err != nil {
49- t .Logf ("\n %s" , b .String ())
50- if err , ok := err .(* exec.ExitError ); ok {
51- // err.ExitCode() not available in go1.11
52- // https://github.com/golang/go/issues/26539
53- t .Errorf ("Test failed: %v" , err .String ())
54- }
55- t .Error (`test failed` )
56- t .FailNow ()
39+ t .Fatal (err )
5740 }
58- t .Logf ("\n %s" , b .String ())
5941}
6042
6143// Type Function Tests
You can’t perform that action at this time.
0 commit comments