]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add test code packages in list -test
authorMichael Matloob <matloob@golang.org>
Fri, 27 Jul 2018 20:23:16 +0000 (16:23 -0400)
committerMichael Matloob <matloob@golang.org>
Mon, 30 Jul 2018 16:40:04 +0000 (16:40 +0000)
commit52cc9e3762171bd45368b3280554bf12a63f23b2
treeca297eacaaf76560459122186679006a61aea852
parente351a1600514b6a4ae18c4b44e883b049c314ebd
cmd/go: add test code packages in list -test

Previously go list -test <pkg> would return pkg and, if it exists,
pkg.test, the test main package. This change will also list the
two test code packages (if they exist) that contain testing functions,
<pkg> [<pkg>.test] and <pkg>_test [<pkg>.test].

These packages which contain testing code are usually the packages
go list users desire to know about, so they should be surfaced
in go list -test.

See the discussion at
golang.org/cl/123635#message-5befbc66663063fb7247645a02ab1327a681e362
for more context.

Change-Id: I7170b539d02b548c050ac54048735ed785f47389
Reviewed-on: https://go-review.googlesource.com/126475
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/go_test.go
src/cmd/go/internal/list/list.go