]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.14] testing: reformat test chatty output
authorJean de Klerk <deklerk@google.com>
Mon, 4 May 2020 20:06:34 +0000 (14:06 -0600)
committerDmitri Shuralyov <dmitshur@golang.org>
Thu, 16 Jul 2020 18:20:50 +0000 (18:20 +0000)
commit2ba9d45f9cc033bfc584701f458a032aa04f89c5
tree218a2cf82f04f2352f985e73c73cbf3f0f36045a
parent399ce807381f897d5ea7bdd3970017976d249738
[release-branch.go1.14] testing: reformat test chatty output

In #24929, we decided to stream chatty test output. It looks like,

foo_test.go:138: TestFoo/sub-1: hello from subtest 1
foo_test.go:138: TestFoo/sub-2: hello from subtest 2

In this CL, we refactor the output to be grouped by === CONT lines, preserving
the old test-file-before-log-line behavior:

=== CONT TestFoo/sub-1
    foo_test.go:138 hello from subtest 1
=== CONT TestFoo/sub-2
    foo_test.go:138 hello from subtest 2

This should remove a layer of verbosity from tests, and make it easier to group
together related lines. It also returns to a more familiar format (the
pre-streaming format), whilst still preserving the streaming feature.

Updates #38458.
Fixes #39308.

Change-Id: Iaef94c580d69cdd541b2ef055aa004f50d72d078
Reviewed-on: https://go-review.googlesource.com/c/go/+/229085
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/242057
Reviewed-by: Jean de Klerk <deklerk@google.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Jean de Klerk <deklerk@google.com>
src/cmd/go/testdata/script/test_benchmark_chatty_fail.txt [new file with mode: 0644]
src/cmd/go/testdata/script/test_benchmark_chatty_success.txt [new file with mode: 0644]
src/cmd/go/testdata/script/test_chatty_fail.txt [new file with mode: 0644]
src/cmd/go/testdata/script/test_chatty_parallel_fail.txt [new file with mode: 0644]
src/cmd/go/testdata/script/test_chatty_parallel_success.txt [new file with mode: 0644]
src/cmd/go/testdata/script/test_chatty_success.txt [new file with mode: 0644]
src/cmd/go/testdata/script/test_regexps.txt
src/testing/benchmark.go
src/testing/sub_test.go
src/testing/testing.go