]> Cypherpunks repositories - gostls13.git/commit
testing: try to Log through parent if test has completed
authorWil Selwood <wselwood@gmail.com>
Thu, 2 Aug 2018 19:29:38 +0000 (20:29 +0100)
committerIan Lance Taylor <iant@golang.org>
Wed, 10 Oct 2018 01:02:14 +0000 (01:02 +0000)
commit95d06ab6c982f58b127b14a52c3325acf0bd3926
tree62bc2e294a010cd56eb0d7fbdcebb47a892cdfcf
parent49be65eeba37a3d29a8a33379794e7a84df6cca1
testing: try to Log through parent if test has completed

If the test has already completed when a go routine with a panic
handler reports an error the location of the error call is lost.

Added logDepth to be able to log location of failure at different
depths down the stack.

Fixes #26720

Change-Id: I8b7789ddae757ef6f4bd315cb20356709f4fadec
Reviewed-on: https://go-review.googlesource.com/c/127596
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/testing/sub_test.go
src/testing/testing.go