From 7a92c4fc637621368eb26a7e72bb027b29568e50 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 7 Nov 2022 11:58:45 -0500 Subject: cmd/go: print test2json start events Add a new "Action":"start" test2json event to mark the start of the test binary execution. This adds useful information to the JSON traces, and it also lets programs watching test execution see the order in which the tests are being run, because we arrange for the starts to happen sequentially. Change-Id: I9fc865a486a55a7e9315f8686f59a2aa06455884 Reviewed-on: https://go-review.googlesource.com/c/go/+/448357 Run-TryBot: Russ Cox Auto-Submit: Russ Cox TryBot-Result: Gopher Robot Reviewed-by: Bryan Mills --- src/cmd/internal/test2json/testdata/panic.json | 1 + 1 file changed, 1 insertion(+) (limited to 'src/cmd/internal/test2json/testdata/panic.json') diff --git a/src/cmd/internal/test2json/testdata/panic.json b/src/cmd/internal/test2json/testdata/panic.json index f7738142e6..1cd4384629 100644 --- a/src/cmd/internal/test2json/testdata/panic.json +++ b/src/cmd/internal/test2json/testdata/panic.json @@ -1,3 +1,4 @@ +{"Action":"start"} {"Action":"output","Test":"TestPanic","Output":"--- FAIL: TestPanic (0.00s)\n"} {"Action":"output","Test":"TestPanic","Output":"panic: oops [recovered]\n"} {"Action":"output","Test":"TestPanic","Output":"\tpanic: oops\n"} -- cgit v1.3