@@ -6,13 +6,13 @@ test runs against global state. This patch introduces a per test level callback
66test and not have state between tests interfere with each other.
77
88diff --git a/src/testing/testing.go b/src/testing/testing.go
9- index 3475bfca4a..074755aef1 100644
9+ index 832d9e597f..7a08341d64 100644
1010--- a/src/testing/testing.go
1111+++ b/src/testing/testing.go
12- @@ -1017 ,6 +1017 ,12 @@ func (c *common) FailNow() {
12+ @@ -1110 ,6 +1110 ,12 @@ func (c *common) FailNow() {
1313 // indentation and the final newline if necessary. It prefixes the string
1414 // with the file and line of the call site.
15- func (c *common) log(s string) {
15+ func (c *common) log(s string, isErr bool ) {
1616+ // allow encore to capture the log as well;
1717+ // we do it here so that all the branches which result in a log message
1818+ // during tests get captured, however we do it _before_ the lines get modified
@@ -22,7 +22,7 @@ index 3475bfca4a..074755aef1 100644
2222 s = strings.TrimSuffix(s, "\n")
2323
2424 // Second and subsequent lines are indented 4 spaces. This is in addition to
25- @@ -1704 ,11 +1710 ,15 @@ func (t *T) Parallel() {
25+ @@ -1953 ,11 +1959 ,15 @@ func (t *T) Parallel() {
2626 }
2727 running.Delete(t.name)
2828
@@ -38,19 +38,19 @@ index 3475bfca4a..074755aef1 100644
3838 if t.chatty != nil {
3939 t.chatty.Updatef(t.name, "=== CONT %s\n", t.name)
4040 }
41- @@ -1773 ,6 +1783 ,7 @@ var errNilPanicOrGoexit = errors.New("test executed panic(nil) or runtime.Goexit
41+ @@ -2029 ,6 +2039 ,7 @@ var errNilPanicOrGoexit = errors.New("test executed panic(nil) or runtime.Goexit
4242
4343 func tRunner(t *T, fn func(t *T)) {
4444 t.runner = callerName(0)
4545+ encoreStartTest(t, fn)
4646
4747 // When this goroutine is done, either because fn(t)
4848 // returned normally or because a test failure triggered
49- @@ -1780 ,6 +1791 ,7 @@ func tRunner(t *T, fn func(t *T)) {
49+ @@ -2036 ,6 +2047 ,7 @@ func tRunner(t *T, fn func(t *T)) {
5050 // a signal saying that the test is done.
5151 defer func() {
5252 t.checkRaces()
5353+ encoreEndTest(t)
5454
55- // TODO(#61034): This is the wrong place for this check .
56- if t.Failed() {
55+ // Check if the test panicked or Goexited inappropriately .
56+ //
0 commit comments