@@ -1102,42 +1102,6 @@ func TestAccidentalGitCheckout(t *testing.T) {
1102
1102
}
1103
1103
}
1104
1104
1105
- func TestVersionControlErrorMessageIncludesCorrectDirectory (t * testing.T ) {
1106
- tg := testgo (t )
1107
- defer tg .cleanup ()
1108
- tg .setenv ("GOPATH" , filepath .Join (tg .pwd (), "testdata/shadow/root1" ))
1109
- tg .runFail ("get" , "-u" , "foo" )
1110
-
1111
- // TODO(iant): We should not have to use strconv.Quote here.
1112
- // The code in vcs.go should be changed so that it is not required.
1113
- quoted := strconv .Quote (filepath .Join ("testdata" , "shadow" , "root1" , "src" , "foo" ))
1114
- quoted = quoted [1 : len (quoted )- 1 ]
1115
-
1116
- tg .grepStderr (regexp .QuoteMeta (quoted ), "go get -u error does not mention shadow/root1/src/foo" )
1117
- }
1118
-
1119
- // Issue 21895
1120
- func TestMSanAndRaceRequireCgo (t * testing.T ) {
1121
- if ! canMSan && ! canRace {
1122
- t .Skip ("skipping because both msan and the race detector are not supported" )
1123
- }
1124
-
1125
- tg := testgo (t )
1126
- defer tg .cleanup ()
1127
- tg .tempFile ("triv.go" , `package main; func main() {}` )
1128
- tg .setenv ("CGO_ENABLED" , "0" )
1129
- if canRace {
1130
- tg .runFail ("install" , "-race" , "triv.go" )
1131
- tg .grepStderr ("-race requires cgo" , "did not correctly report that -race requires cgo" )
1132
- tg .grepStderrNot ("-msan" , "reported that -msan instead of -race requires cgo" )
1133
- }
1134
- if canMSan {
1135
- tg .runFail ("install" , "-msan" , "triv.go" )
1136
- tg .grepStderr ("-msan requires cgo" , "did not correctly report that -msan requires cgo" )
1137
- tg .grepStderrNot ("-race" , "reported that -race instead of -msan requires cgo" )
1138
- }
1139
- }
1140
-
1141
1105
func TestPackageMainTestCompilerFlags (t * testing.T ) {
1142
1106
tg := testgo (t )
1143
1107
defer tg .cleanup ()
@@ -1776,28 +1740,6 @@ func main() {
1776
1740
tg .run ("run" , tg .path ("foo.go" ))
1777
1741
}
1778
1742
1779
- // cmd/cgo: undefined reference when linking a C-library using gccgo
1780
- func TestIssue7573 (t * testing.T ) {
1781
- if ! canCgo {
1782
- t .Skip ("skipping because cgo not enabled" )
1783
- }
1784
- testenv .MustHaveExecPath (t , "gccgo" )
1785
-
1786
- tg := testgo (t )
1787
- defer tg .cleanup ()
1788
- tg .parallel ()
1789
- tg .tempFile ("src/cgoref/cgoref.go" , `
1790
- package main
1791
- // #cgo LDFLAGS: -L alibpath -lalib
1792
- // void f(void) {}
1793
- import "C"
1794
-
1795
- func main() { C.f() }` )
1796
- tg .setenv ("GOPATH" , tg .path ("." ))
1797
- tg .run ("build" , "-n" , "-compiler" , "gccgo" , "cgoref" )
1798
- tg .grepStderr (`gccgo.*\-L [^ ]*alibpath \-lalib` , `no Go-inline "#cgo LDFLAGS:" ("-L alibpath -lalib") passed to gccgo linking stage` )
1799
- }
1800
-
1801
1743
func TestListTemplateContextFunction (t * testing.T ) {
1802
1744
t .Parallel ()
1803
1745
for _ , tt := range []struct {
@@ -1986,16 +1928,6 @@ func TestImportLocal(t *testing.T) {
1986
1928
tg .grepStderr ("cannot import current directory" , "did not diagnose import current directory" )
1987
1929
}
1988
1930
1989
- func TestGoRunDirs (t * testing.T ) {
1990
- tg := testgo (t )
1991
- defer tg .cleanup ()
1992
- tg .cd ("testdata/rundir" )
1993
- tg .runFail ("run" , "x.go" , "sub/sub.go" )
1994
- tg .grepStderr ("named files must all be in one directory; have ./ and sub/" , "wrong output" )
1995
- tg .runFail ("run" , "sub/sub.go" , "x.go" )
1996
- tg .grepStderr ("named files must all be in one directory; have sub/ and ./" , "wrong output" )
1997
- }
1998
-
1999
1931
func TestGoInstallPkgdir (t * testing.T ) {
2000
1932
skipIfGccgo (t , "gccgo has no standard packages" )
2001
1933
tooSlow (t )
@@ -2013,26 +1945,6 @@ func TestGoInstallPkgdir(t *testing.T) {
2013
1945
tg .mustExist (filepath .Join (pkg , "sync/atomic.a" ))
2014
1946
}
2015
1947
2016
- func TestGoInstallShadowedGOPATH (t * testing.T ) {
2017
- // golang.org/issue/3652.
2018
- // go get foo.io (not foo.io/subdir) was not working consistently.
2019
-
2020
- testenv .MustHaveExternalNetwork (t )
2021
-
2022
- tg := testgo (t )
2023
- defer tg .cleanup ()
2024
- tg .makeTempdir ()
2025
- tg .setenv ("GOPATH" , tg .path ("gopath1" )+ string (filepath .ListSeparator )+ tg .path ("gopath2" ))
2026
-
2027
- tg .tempDir ("gopath1/src/test" )
2028
- tg .tempDir ("gopath2/src/test" )
2029
- tg .tempFile ("gopath2/src/test/main.go" , "package main\n func main(){}\n " )
2030
-
2031
- tg .cd (tg .path ("gopath2/src/test" ))
2032
- tg .runFail ("install" )
2033
- tg .grepStderr ("no install location for.*gopath2.src.test: hidden by .*gopath1.src.test" , "missing error" )
2034
- }
2035
-
2036
1948
func TestGoBuildGOPATHOrder (t * testing.T ) {
2037
1949
// golang.org/issue/14176#issuecomment-179895769
2038
1950
// golang.org/issue/14192
@@ -2353,17 +2265,6 @@ func main() {
2353
2265
tg .run ("build" , "-o" , exe , "p" )
2354
2266
}
2355
2267
2356
- func TestBuildTagsNoComma (t * testing.T ) {
2357
- skipIfGccgo (t , "gccgo has no standard packages" )
2358
- tg := testgo (t )
2359
- defer tg .cleanup ()
2360
- tg .makeTempdir ()
2361
- tg .setenv ("GOPATH" , tg .path ("go" ))
2362
- tg .run ("build" , "-tags" , "tag1 tag2" , "math" )
2363
- tg .runFail ("build" , "-tags" , "tag1,tag2 tag3" , "math" )
2364
- tg .grepBoth ("space-separated list contains comma" , "-tags with a comma-separated list didn't error" )
2365
- }
2366
-
2367
2268
func copyFile (src , dst string , perm os.FileMode ) error {
2368
2269
sf , err := os .Open (src )
2369
2270
if err != nil {
0 commit comments