aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2019-07-18 17:34:59 -0400
committerBryan C. Mills <bcmills@google.com>2019-07-22 21:42:51 +0000
commit5e21032b3d179a8bc0d9e70e4725629defad9d8b (patch)
treef10f5f4845b799a02397feda3d8a78a247d69e14 /src/testing/testing.go
parentf518a96e009157c51f8ecf619032bbb7873228f9 (diff)
downloadgo-5e21032b3d179a8bc0d9e70e4725629defad9d8b.tar.gz
go-5e21032b3d179a8bc0d9e70e4725629defad9d8b.zip
Revert "cmd/go: move automatic testing.Init call into generated test code"
This reverts CL 176098. Reason for revert: added complexity, but did not completely fix the underlying problem. A complete solution would not be worth the complexity, and as a partial solution this is probably not worth the complexity either. Updates #31859 Change-Id: Ifd34c292fd1b811c60afe3c339e5edd3f37190c8 Reviewed-on: https://go-review.googlesource.com/c/go/+/186817 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Caleb Spare <cespare@gmail.com>
Diffstat (limited to 'src/testing/testing.go')
-rw-r--r--src/testing/testing.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go
index 339df13f43..6ab9b79196 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -1075,11 +1075,6 @@ type testDeps interface {
// It is not meant to be called directly and is not subject to the Go 1 compatibility document.
// It may change signature from release to release.
func MainStart(deps testDeps, tests []InternalTest, benchmarks []InternalBenchmark, examples []InternalExample) *M {
- // In most cases, Init has already been called by the testinginit code
- // that 'go test' injects into test packages.
- // Call it again here to handle cases such as:
- // - test packages that don't import "testing" (such as example-only packages)
- // - direct use of MainStart (though that isn't well-supported)
Init()
return &M{
deps: deps,