]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix build
authorRuss Cox <rsc@golang.org>
Wed, 15 Jul 2015 04:51:24 +0000 (00:51 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 15 Jul 2015 05:05:52 +0000 (05:05 +0000)
Failures noted by dashboard.

Change-Id: I22f90120c6687b64b9efff9df7a7fa8f26d24bac
Reviewed-on: https://go-review.googlesource.com/12207
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/build.go
src/cmd/go/go_test.go
src/cmd/go/testdata/src/testdep/p1/p1.go [new file with mode: 0644]
src/cmd/go/testdata/src/testdep/p1/p1_test.go [new file with mode: 0644]
src/cmd/go/testdata/src/testdep/p2/p2.go [new file with mode: 0644]
src/cmd/go/testdata/src/testdep/p3/p3.go [new file with mode: 0644]

index 54944a6340c3199d5ed45ae6c1eebdfbc165c784..2d2f10dc36a799b778056e75375103bd941575cf 100644 (file)
@@ -719,7 +719,7 @@ func goFilesPackage(gofiles []string) *Package {
                }
                dir1, _ := filepath.Split(file)
                if dir1 == "" {
-                       dir1 = "."
+                       dir1 = "./"
                }
                if dir == "" {
                        dir = dir1
index 1e7388467b31adac3aa0470605ad1e7a7ff9cc25..f3ab8297290d4157a5261ba90d2a911968ed7fd7 100644 (file)
@@ -2081,9 +2081,9 @@ func TestGoRunDirs(t *testing.T) {
        defer tg.cleanup()
        tg.cd("testdata/rundir")
        tg.runFail("run", "x.go", "sub/sub.go")
-       tg.grepStderr("named files must all be in one directory; have . and sub/", "wrong output")
+       tg.grepStderr("named files must all be in one directory; have ./ and sub/", "wrong output")
        tg.runFail("run", "sub/sub.go", "x.go")
-       tg.grepStderr("named files must all be in one directory; have sub/ and .", "wrong output")
+       tg.grepStderr("named files must all be in one directory; have sub/ and ./", "wrong output")
 }
 
 func TestGoInstallPkgdir(t *testing.T) {
@@ -2099,6 +2099,13 @@ func TestGoInstallPkgdir(t *testing.T) {
 }
 
 func TestGoTestRaceInstallCgo(t *testing.T) {
+       switch sys := runtime.GOOS + "/" + runtime.GOARCH; sys {
+       case "darwin/amd64", "freebsd/amd64", "linux/amd64", "windows/amd64":
+               // ok
+       default:
+               t.Skip("no race detector on %s", sys)
+       }
+
        // golang.org/issue/10500.
        // This used to install a race-enabled cgo.
        tg := testgo(t)
diff --git a/src/cmd/go/testdata/src/testdep/p1/p1.go b/src/cmd/go/testdata/src/testdep/p1/p1.go
new file mode 100644 (file)
index 0000000..a457035
--- /dev/null
@@ -0,0 +1 @@
+package p1
diff --git a/src/cmd/go/testdata/src/testdep/p1/p1_test.go b/src/cmd/go/testdata/src/testdep/p1/p1_test.go
new file mode 100644 (file)
index 0000000..8be7533
--- /dev/null
@@ -0,0 +1,3 @@
+package p1
+
+import _ "testdep/p2"
diff --git a/src/cmd/go/testdata/src/testdep/p2/p2.go b/src/cmd/go/testdata/src/testdep/p2/p2.go
new file mode 100644 (file)
index 0000000..15ba2ea
--- /dev/null
@@ -0,0 +1,3 @@
+package p2
+
+import _ "testdep/p3"
diff --git a/src/cmd/go/testdata/src/testdep/p3/p3.go b/src/cmd/go/testdata/src/testdep/p3/p3.go
new file mode 100644 (file)
index 0000000..0219e7f
--- /dev/null
@@ -0,0 +1,3 @@
+// +build ignore
+
+package ignored