]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: allow either test to complete first in TestScript/test_chatty_parallel_succes...
authorBryan C. Mills <bcmills@google.com>
Thu, 31 Mar 2022 15:03:00 +0000 (11:03 -0400)
committerBryan Mills <bcmills@google.com>
Thu, 31 Mar 2022 20:34:32 +0000 (20:34 +0000)
This fixes a failure mode observed in
https://build.golang.org/log/7b28a914b1914dabe94f7c4e36ad6466ebd4de5d,
in which the expected CONT lines are present but the test completions
are reported in a different (but valid) order.

CONT lines are only printed between interleaved output lines, so if
the ordering of the tests swaps after all output is already generated
the PASS lines can be in arbitrary order.

Fixes #51221 (again).

Change-Id: I051f8ec4331e2e3ab1bb00a7c188c322ad4e0a03
Reviewed-on: https://go-review.googlesource.com/c/go/+/397194
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/testdata/script/test_chatty_parallel_success_run.txt

index b0f4cc1977596dd621f5b4edab621f13bb1c5b44..4e0f239a661af2985247b5b3032293cb3afe98de 100644 (file)
@@ -2,7 +2,7 @@
 # multiple parallel outputs have the appropriate CONT lines between them.
 go test -parallel 3 chatty_parallel -v
 
-stdout '=== RUN   TestInterruptor/interruption\n=== CONT  TestLog\n    chatty_parallel_test.go:28: this is the second TestLog log\n--- PASS: TestLog \([0-9.]{4}s\)'
+stdout '=== RUN   TestInterruptor/interruption\n=== CONT  TestLog\n    chatty_parallel_test.go:28: this is the second TestLog log\n--- PASS: Test(Log|Interruptor) \([0-9.]{4}s\)'
 
 -- go.mod --
 module chatty_parallel