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:
parent
f4f7db414d
commit
3457359b90
@ -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()
|
||||
|
8
src/cmd/go/testdata/script/install_relative_gobin_fail.txt
vendored
Normal file
8
src/cmd/go/testdata/script/install_relative_gobin_fail.txt
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
env GOBIN=.
|
||||
! go install
|
||||
stderr 'cannot install, GOBIN must be an absolute path'
|
||||
|
||||
-- triv.go --
|
||||
package main
|
||||
|
||||
func main() {}
|
Loading…
Reference in New Issue
Block a user