]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: run tests that require symlinks
authorAlex Brainman <alex.brainman@gmail.com>
Mon, 8 May 2017 06:40:49 +0000 (16:40 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 9 May 2017 04:49:30 +0000 (04:49 +0000)
Change-Id: I19a724ea4eb1ba0ff558721650c89a949e53b7c7
Reviewed-on: https://go-review.googlesource.com/42895
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/go_test.go

index 930df005df01b214a46596e3b576e7433a2159f1..bc6e1baab731ed132585121e787f179c94d6814c 100644 (file)
@@ -1908,10 +1908,7 @@ func TestGoTestDashIDashOWritesBinary(t *testing.T) {
 
 // Issue 4568.
 func TestSymlinksList(t *testing.T) {
-       switch runtime.GOOS {
-       case "plan9", "windows":
-               t.Skipf("skipping symlink test on %s", runtime.GOOS)
-       }
+       testenv.MustHaveSymlink(t)
 
        tg := testgo(t)
        defer tg.cleanup()
@@ -1929,10 +1926,7 @@ func TestSymlinksList(t *testing.T) {
 
 // Issue 14054.
 func TestSymlinksVendor(t *testing.T) {
-       switch runtime.GOOS {
-       case "plan9", "windows":
-               t.Skipf("skipping symlink test on %s", runtime.GOOS)
-       }
+       testenv.MustHaveSymlink(t)
 
        tg := testgo(t)
        defer tg.cleanup()
@@ -1956,10 +1950,7 @@ func TestSymlinksVendor(t *testing.T) {
 
 // Issue 15201.
 func TestSymlinksVendor15201(t *testing.T) {
-       switch runtime.GOOS {
-       case "plan9", "windows":
-               t.Skipf("skipping symlink test on %s", runtime.GOOS)
-       }
+       testenv.MustHaveSymlink(t)
 
        tg := testgo(t)
        defer tg.cleanup()
@@ -1976,10 +1967,7 @@ func TestSymlinksVendor15201(t *testing.T) {
 }
 
 func TestSymlinksInternal(t *testing.T) {
-       switch runtime.GOOS {
-       case "plan9", "windows":
-               t.Skipf("skipping symlink test on %s", runtime.GOOS)
-       }
+       testenv.MustHaveSymlink(t)
 
        tg := testgo(t)
        defer tg.cleanup()
@@ -3995,10 +3983,7 @@ func TestExecutableGOROOT(t *testing.T) {
                t.Fatalf("%s env GOROOT = %q with pkg/tool, want %q", newGoTool, got, want)
        }
 
-       switch runtime.GOOS {
-       case "plan9", "windows":
-               t.Skipf("skipping symlink test on %s", runtime.GOOS)
-       }
+       testenv.MustHaveSymlink(t)
 
        tg.tempDir("notgoroot/bin")
        symGoTool := tg.path("notgoroot/bin/go" + exeSuffix)