aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/test/test.go
diff options
context:
space:
mode:
authorJordi Martin <jordimartin@gmail.com>2019-10-04 11:56:26 +0000
committerJay Conrod <jayconrod@google.com>2019-10-04 17:30:40 +0000
commit3ce29b44bb8eaecbd5000202564ad4f52ad1cf69 (patch)
treec6b4cc23dac62e659b56fee443f320b9148d1b88 /src/cmd/go/internal/test/test.go
parent43a4c61e125d184a8c9dac2d55cfa4ae31153fe8 (diff)
downloadgo-3ce29b44bb8eaecbd5000202564ad4f52ad1cf69.tar.gz
go-3ce29b44bb8eaecbd5000202564ad4f52ad1cf69.zip
cmd/go: set expected filename when building a local package with -o is pointing to a folder
In the local package build process, when -o is pointing to an existing folder, the object the filename is generated from files listed on the command line like when the -o is not pointing to a folder instead of using the `importPath` that is going to be `command-line-arguments` Fixes #34535 Change-Id: I09a7609c17a2ccdd83da32f01247c0ef473dea1e GitHub-Last-Rev: b3224226a3914aa2573e47a6daff9fd5a48ca225 GitHub-Pull-Request: golang/go#34562 Reviewed-on: https://go-review.googlesource.com/c/go/+/197544 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/test/test.go')
-rw-r--r--src/cmd/go/internal/test/test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go
index 8141e31c99..fb011d4c03 100644
--- a/src/cmd/go/internal/test/test.go
+++ b/src/cmd/go/internal/test/test.go
@@ -829,7 +829,7 @@ func builderTest(b *work.Builder, p *load.Package) (buildAction, runAction, prin
if p.ImportPath == "command-line-arguments" {
elem = p.Name
} else {
- elem = load.DefaultExecName(p.ImportPath)
+ elem = p.DefaultExecName()
}
testBinary := elem + ".test"