1
0
mirror of https://github.com/golang/go synced 2024-11-23 06:50:05 -07:00

cmd/go: convert TestRelativeGOBINFail to script framework

Part of converting all tests to script framework to improve
test parallelism.

Updates #36320
Updates #17751

Change-Id: I1cb3e2e28700b05b08933f4e24cd996268c1f163
Reviewed-on: https://go-review.googlesource.com/c/go/+/214428
Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
Michael Matloob 2020-01-13 11:24:06 -05:00
parent f4f7db414d
commit 3457359b90
2 changed files with 8 additions and 10 deletions

View File

@ -1138,16 +1138,6 @@ func TestMSanAndRaceRequireCgo(t *testing.T) {
}
}
func TestRelativeGOBINFail(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()
tg.tempFile("triv.go", `package main; func main() {}`)
tg.setenv("GOBIN", ".")
tg.cd(tg.path("."))
tg.runFail("install")
tg.grepStderr("cannot install, GOBIN must be an absolute path", "go install must fail if $GOBIN is a relative path")
}
func TestPackageMainTestCompilerFlags(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()

View File

@ -0,0 +1,8 @@
env GOBIN=.
! go install
stderr 'cannot install, GOBIN must be an absolute path'
-- triv.go --
package main
func main() {}