diff options
| author | Ethan Reesor <ethan.reesor@gmail.com> | 2024-11-16 08:42:53 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-03-09 11:02:05 -0700 |
| commit | d82eb907f3ef66e99d1ef08c0b34ffffbd49de5e (patch) | |
| tree | 5277470c46168798a3b61c53ada7408404c355ac /src/cmd/internal/test2json/testdata/framefuzz.json | |
| parent | f5d830d57ae0e490d73442d2e04f73322266dbc6 (diff) | |
| download | go-d82eb907f3ef66e99d1ef08c0b34ffffbd49de5e.tar.xz | |
testing: annotate output text type
Provides a way to disambiguate output produced by (*testing.T).Error{,f}
and (*testing.T).Fatal{,f} from other test logging. This allows test
tooling such as CI systems to identify which part of the output is most
pertinent for constructing summaries of test failures.
This is achieved by adding an OutputType field to output events. The
output type for an error is "error" for the first line and
"error-continue" for subsequentlines. The output type for framing is
"frame". This is achieved by bracketing error output with ^O and ^N,
escaped with ^[.
Fixes golang/go#62728.
Change-Id: Ib09c18ed5f729e1ae6d335cd1ec7d818c71532e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/601535
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/cmd/internal/test2json/testdata/framefuzz.json')
| -rw-r--r-- | src/cmd/internal/test2json/testdata/framefuzz.json | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/cmd/internal/test2json/testdata/framefuzz.json b/src/cmd/internal/test2json/testdata/framefuzz.json index 25869ee740..c8647dad3a 100644 --- a/src/cmd/internal/test2json/testdata/framefuzz.json +++ b/src/cmd/internal/test2json/testdata/framefuzz.json @@ -1,43 +1,43 @@ {"Action":"start"} {"Action":"run","Test":"TestAddrStringAllocs"} -{"Action":"output","Test":"TestAddrStringAllocs","Output":"=== RUN TestAddrStringAllocs\n"} +{"Action":"output","Test":"TestAddrStringAllocs","Output":"=== RUN TestAddrStringAllocs\n","OutputType":"frame"} {"Action":"run","Test":"TestAddrStringAllocs/zero"} -{"Action":"output","Test":"TestAddrStringAllocs/zero","Output":"=== RUN TestAddrStringAllocs/zero\n"} +{"Action":"output","Test":"TestAddrStringAllocs/zero","Output":"=== RUN TestAddrStringAllocs/zero\n","OutputType":"frame"} {"Action":"run","Test":"TestAddrStringAllocs/ipv4"} -{"Action":"output","Test":"TestAddrStringAllocs/ipv4","Output":"=== RUN TestAddrStringAllocs/ipv4\n"} +{"Action":"output","Test":"TestAddrStringAllocs/ipv4","Output":"=== RUN TestAddrStringAllocs/ipv4\n","OutputType":"frame"} {"Action":"run","Test":"TestAddrStringAllocs/ipv6"} -{"Action":"output","Test":"TestAddrStringAllocs/ipv6","Output":"=== RUN TestAddrStringAllocs/ipv6\n"} +{"Action":"output","Test":"TestAddrStringAllocs/ipv6","Output":"=== RUN TestAddrStringAllocs/ipv6\n","OutputType":"frame"} {"Action":"run","Test":"TestAddrStringAllocs/ipv6+zone"} -{"Action":"output","Test":"TestAddrStringAllocs/ipv6+zone","Output":"=== RUN TestAddrStringAllocs/ipv6+zone\n"} +{"Action":"output","Test":"TestAddrStringAllocs/ipv6+zone","Output":"=== RUN TestAddrStringAllocs/ipv6+zone\n","OutputType":"frame"} {"Action":"run","Test":"TestAddrStringAllocs/ipv4-in-ipv6"} -{"Action":"output","Test":"TestAddrStringAllocs/ipv4-in-ipv6","Output":"=== RUN TestAddrStringAllocs/ipv4-in-ipv6\n"} +{"Action":"output","Test":"TestAddrStringAllocs/ipv4-in-ipv6","Output":"=== RUN TestAddrStringAllocs/ipv4-in-ipv6\n","OutputType":"frame"} {"Action":"run","Test":"TestAddrStringAllocs/ipv4-in-ipv6+zone"} -{"Action":"output","Test":"TestAddrStringAllocs/ipv4-in-ipv6+zone","Output":"=== RUN TestAddrStringAllocs/ipv4-in-ipv6+zone\n"} -{"Action":"output","Test":"TestAddrStringAllocs","Output":"--- PASS: TestAddrStringAllocs (0.00s)\n"} -{"Action":"output","Test":"TestAddrStringAllocs/zero","Output":" --- PASS: TestAddrStringAllocs/zero (0.00s)\n"} +{"Action":"output","Test":"TestAddrStringAllocs/ipv4-in-ipv6+zone","Output":"=== RUN TestAddrStringAllocs/ipv4-in-ipv6+zone\n","OutputType":"frame"} +{"Action":"output","Test":"TestAddrStringAllocs","Output":"--- PASS: TestAddrStringAllocs (0.00s)\n","OutputType":"frame"} +{"Action":"output","Test":"TestAddrStringAllocs/zero","Output":" --- PASS: TestAddrStringAllocs/zero (0.00s)\n","OutputType":"frame"} {"Action":"pass","Test":"TestAddrStringAllocs/zero"} -{"Action":"output","Test":"TestAddrStringAllocs/ipv4","Output":" --- PASS: TestAddrStringAllocs/ipv4 (0.00s)\n"} +{"Action":"output","Test":"TestAddrStringAllocs/ipv4","Output":" --- PASS: TestAddrStringAllocs/ipv4 (0.00s)\n","OutputType":"frame"} {"Action":"pass","Test":"TestAddrStringAllocs/ipv4"} -{"Action":"output","Test":"TestAddrStringAllocs/ipv6","Output":" --- PASS: TestAddrStringAllocs/ipv6 (0.00s)\n"} +{"Action":"output","Test":"TestAddrStringAllocs/ipv6","Output":" --- PASS: TestAddrStringAllocs/ipv6 (0.00s)\n","OutputType":"frame"} {"Action":"pass","Test":"TestAddrStringAllocs/ipv6"} -{"Action":"output","Test":"TestAddrStringAllocs/ipv6+zone","Output":" --- PASS: TestAddrStringAllocs/ipv6+zone (0.00s)\n"} +{"Action":"output","Test":"TestAddrStringAllocs/ipv6+zone","Output":" --- PASS: TestAddrStringAllocs/ipv6+zone (0.00s)\n","OutputType":"frame"} {"Action":"pass","Test":"TestAddrStringAllocs/ipv6+zone"} -{"Action":"output","Test":"TestAddrStringAllocs/ipv4-in-ipv6","Output":" --- PASS: TestAddrStringAllocs/ipv4-in-ipv6 (0.00s)\n"} +{"Action":"output","Test":"TestAddrStringAllocs/ipv4-in-ipv6","Output":" --- PASS: TestAddrStringAllocs/ipv4-in-ipv6 (0.00s)\n","OutputType":"frame"} {"Action":"pass","Test":"TestAddrStringAllocs/ipv4-in-ipv6"} -{"Action":"output","Test":"TestAddrStringAllocs/ipv4-in-ipv6+zone","Output":" --- PASS: TestAddrStringAllocs/ipv4-in-ipv6+zone (0.00s)\n"} +{"Action":"output","Test":"TestAddrStringAllocs/ipv4-in-ipv6+zone","Output":" --- PASS: TestAddrStringAllocs/ipv4-in-ipv6+zone (0.00s)\n","OutputType":"frame"} {"Action":"pass","Test":"TestAddrStringAllocs/ipv4-in-ipv6+zone"} {"Action":"pass","Test":"TestAddrStringAllocs"} {"Action":"run","Test":"TestPrefixString"} -{"Action":"output","Test":"TestPrefixString","Output":"=== RUN TestPrefixString\n"} -{"Action":"output","Test":"TestPrefixString","Output":"--- PASS: TestPrefixString (0.00s)\n"} +{"Action":"output","Test":"TestPrefixString","Output":"=== RUN TestPrefixString\n","OutputType":"frame"} +{"Action":"output","Test":"TestPrefixString","Output":"--- PASS: TestPrefixString (0.00s)\n","OutputType":"frame"} {"Action":"pass","Test":"TestPrefixString"} {"Action":"run","Test":"TestInvalidAddrPortString"} -{"Action":"output","Test":"TestInvalidAddrPortString","Output":"=== RUN TestInvalidAddrPortString\n"} -{"Action":"output","Test":"TestInvalidAddrPortString","Output":"--- PASS: TestInvalidAddrPortString (0.00s)\n"} +{"Action":"output","Test":"TestInvalidAddrPortString","Output":"=== RUN TestInvalidAddrPortString\n","OutputType":"frame"} +{"Action":"output","Test":"TestInvalidAddrPortString","Output":"--- PASS: TestInvalidAddrPortString (0.00s)\n","OutputType":"frame"} {"Action":"pass","Test":"TestInvalidAddrPortString"} {"Action":"run","Test":"TestAsSlice"} -{"Action":"output","Test":"TestAsSlice","Output":"=== RUN TestAsSlice\n"} -{"Action":"output","Test":"TestAsSlice","Output":"--- PASS: TestAsSlice (0.00s)\n"} +{"Action":"output","Test":"TestAsSlice","Output":"=== RUN TestAsSlice\n","OutputType":"frame"} +{"Action":"output","Test":"TestAsSlice","Output":"--- PASS: TestAsSlice (0.00s)\n","OutputType":"frame"} {"Action":"pass","Test":"TestAsSlice"} {"Action":"output","Test":"TestInlining","Output":" inlining_test.go:102: not in expected set, but also inlinable: \"Addr.string4\"\n"} {"Action":"output","Test":"TestInlining","Output":" inlining_test.go:102: not in expected set, but also inlinable: \"Prefix.isZero\"\n"} @@ -55,15 +55,15 @@ {"Action":"output","Test":"TestInlining","Output":" inlining_test.go:102: not in expected set, but also inlinable: \"beUint64\"\n"} {"Action":"output","Test":"TestInlining","Output":" inlining_test.go:102: not in expected set, but also inlinable: \"appendHexPad\"\n"} {"Action":"output","Test":"TestInlining","Output":" inlining_test.go:102: not in expected set, but also inlinable: \"lePutUint16\"\n"} -{"Action":"output","Test":"TestInlining","Output":"--- PASS: TestInlining (0.10s)\n"} +{"Action":"output","Test":"TestInlining","Output":"--- PASS: TestInlining (0.10s)\n","OutputType":"frame"} {"Action":"pass","Test":"TestInlining"} {"Action":"run","Test":"FuzzParse"} -{"Action":"output","Test":"FuzzParse","Output":"=== RUN FuzzParse\n"} +{"Action":"output","Test":"FuzzParse","Output":"=== RUN FuzzParse\n","OutputType":"frame"} {"Action":"output","Test":"FuzzParse","Output":"fuzz: elapsed: 0s, gathering baseline coverage: 0/390 completed\n"} {"Action":"output","Test":"FuzzParse","Output":"fuzz: elapsed: 0s, gathering baseline coverage: 390/390 completed, now fuzzing with 16 workers\n"} {"Action":"output","Test":"FuzzParse","Output":"fuzz: elapsed: 3s, execs: 438666 (146173/sec), new interesting: 12 (total: 402)\n"} {"Action":"output","Test":"FuzzParse","Output":"\u0003fuzz: elapsed: 4s, execs: 558467 (147850/sec), new interesting: 15 (total: 405)\n"} -{"Action":"output","Test":"FuzzParse","Output":"--- PASS: FuzzParse (3.85s)\n"} +{"Action":"output","Test":"FuzzParse","Output":"--- PASS: FuzzParse (3.85s)\n","OutputType":"frame"} {"Action":"pass","Test":"FuzzParse"} -{"Action":"output","Output":"PASS\n"} +{"Action":"output","Output":"PASS\n","OutputType":"frame"} {"Action":"pass"} |
