-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: don't split internal test main packages twice
Fixes #34321 Change-Id: Ia6253038c525089e20a1da64a2c5c9dcc57edd74 Reviewed-on: https://go-review.googlesource.com/c/go/+/195677 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
- Loading branch information
Jay Conrod
committed
Sep 16, 2019
1 parent
7f907b9
commit 4d18a7c
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This test checks that a "main" package with an external test package | ||
# is recompiled only once. | ||
# Verifies golang.org/issue/34321. | ||
|
||
env GO111MODULE=off | ||
|
||
go list -e -test -deps -f '{{if not .Standard}}{{.ImportPath}}{{end}}' pkg | ||
cmp stdout want | ||
|
||
-- $GOPATH/src/pkg/pkg.go -- | ||
package main | ||
|
||
func main() {} | ||
|
||
-- $GOPATH/src/pkg/pkg_test.go -- | ||
package main | ||
|
||
import "testing" | ||
|
||
func Test(t *testing.T) {} | ||
|
||
-- want -- | ||
pkg | ||
pkg [pkg.test] | ||
pkg.test |