]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/testcarchive: fix build
authorElias Naur <elias.naur@gmail.com>
Fri, 25 Mar 2016 00:27:34 +0000 (01:27 +0100)
committerElias Naur <elias.naur@gmail.com>
Fri, 25 Mar 2016 00:55:07 +0000 (00:55 +0000)
I failed to rebase (and re-test) CL 21102 before submit, which meant
that two extra tests sneaked into testcarchive that still referenced
runtime.GOOS and runtime.GOARCH.

Convert the new tests.

While we're here, make sure pending tasks are flushed before running
the host tests. If not, the "##### misc/cgo/testcarchive" banner
and "PASS" won't show up in the all.bash output.

Change-Id: I41fc4ec9515f9a193fa052f7c31fac452153c897
Reviewed-on: https://go-review.googlesource.com/21106
Run-TryBot: Elias Naur <elias.naur@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

misc/cgo/testcarchive/carchive_test.go
src/cmd/dist/test.go

index a853cba32b9ad3d2004ed7402c36074b4a9468dd..6771ad3be14b2baff72ae01158f8aab987b6e899 100644 (file)
@@ -227,11 +227,11 @@ func TestEarlySignalHandler(t *testing.T) {
 }
 
 func TestSignalForwarding(t *testing.T) {
-       switch runtime.GOOS {
+       switch GOOS {
        case "darwin":
-               switch runtime.GOARCH {
+               switch GOARCH {
                case "arm", "arm64":
-                       t.Skipf("skipping on %s/%s; see https://golang.org/issue/13701", runtime.GOOS, runtime.GOARCH)
+                       t.Skipf("skipping on %s/%s; see https://golang.org/issue/13701", GOOS, GOARCH)
                }
        case "windows":
                t.Skip("skipping signal test on Windows")
@@ -277,11 +277,11 @@ func TestSignalForwarding(t *testing.T) {
 }
 
 func TestSignalForwardingExternal(t *testing.T) {
-       switch runtime.GOOS {
+       switch GOOS {
        case "darwin":
-               switch runtime.GOARCH {
+               switch GOARCH {
                case "arm", "arm64":
-                       t.Skipf("skipping on %s/%s; see https://golang.org/issue/13701", runtime.GOOS, runtime.GOARCH)
+                       t.Skipf("skipping on %s/%s; see https://golang.org/issue/13701", GOOS, GOARCH)
                }
        case "windows":
                t.Skip("skipping signal test on Windows")
index d5bb1362fb86e9a27c8dc9f8f43ca48f2d898258..23d8c3939cf7a257d57b3ec6ea61b2f14d27c1b0 100644 (file)
@@ -696,6 +696,7 @@ func (t *tester) registerHostTest(name, dirBanner, pkg string) {
                name:    name,
                heading: dirBanner,
                fn: func(dt *distTest) error {
+                       t.runPending(dt)
                        return t.runHostTest(dirBanner, pkg)
                },
        })