]> Cypherpunks repositories - gostls13.git/commit
cmd/go: sometimes name tmp test binary test.test.exe on Windows
authorRuss Cox <rsc@golang.org>
Tue, 30 Sep 2014 18:30:40 +0000 (14:30 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 30 Sep 2014 18:30:40 +0000 (14:30 -0400)
commitc017a4e118c9574c0b1eefa661b46bf81ab6e7c2
treea52230b9e69119fc94f5b3e812b674cb5942437d
parent8b5221a57b41a19abcb4e3dde20014af494048c2
cmd/go: sometimes name tmp test binary test.test.exe on Windows

Right now it is always pkgname.test.exe, but if pkgname is
patch or install or setup or update, Windows thinks that
running it will install new software, so it pops up a dialog
box asking for more permission.
Renaming the binary avoids the Windows security check.

This only applies to the binary that the Go command writes
to its temporary work directory. If the user runs 'go test -c'
or any of the other ways to generate a test binary, it will
continue to use pkgname.test.exe.

Fixes #8711.

LGTM=bradfitz
R=golang-codereviews, r
CC=alex.brainman, bradfitz, golang-codereviews, iant
https://golang.org/cl/146580043
src/cmd/go/test.go