]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: when -compile-only is set, write binaries to os.DevNull
authorBryan C. Mills <bcmills@google.com>
Fri, 15 Nov 2019 17:29:04 +0000 (12:29 -0500)
committerBryan C. Mills <bcmills@google.com>
Fri, 15 Nov 2019 18:52:11 +0000 (18:52 +0000)
Previously, we were writing binaries to GOROOT without ever reading them.

Updates #28387

Change-Id: Ic84999f46a367fcbf2ae1eac8bfdcbceb24dc748
Reviewed-on: https://go-review.googlesource.com/c/go/+/207342
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/dist/test.go

index 2a452f0453ff48cb5eec0d2de44c17e35e391078..17c875cfe82c259b817dc5711db9864510ff679c 100644 (file)
@@ -748,7 +748,7 @@ func (t *tester) registerTests() {
                        heading: "API check",
                        fn: func(dt *distTest) error {
                                if t.compileOnly {
-                                       t.addCmd(dt, "src", "go", "build", filepath.Join(goroot, "src/cmd/api/run.go"))
+                                       t.addCmd(dt, "src", "go", "build", "-o", os.DevNull, filepath.Join(goroot, "src/cmd/api/run.go"))
                                        return nil
                                }
                                t.addCmd(dt, "src", "go", "run", filepath.Join(goroot, "src/cmd/api/run.go"))