]> Cypherpunks repositories - gostls13.git/commitdiff
os: skip TestHostname on Plan 9
authorDavid du Colombier <0intro@gmail.com>
Tue, 16 Jun 2015 21:42:23 +0000 (23:42 +0200)
committerDavid du Colombier <0intro@gmail.com>
Tue, 16 Jun 2015 22:07:01 +0000 (22:07 +0000)
TestHostname was re-enabled in CL 10753.
However, on Plan 9 the hostname is not obtained
by executing a "hostname" command, but by reading
the #c/sysname file.

Change-Id: I80c0e303f4983fe39ceb300ad64e2c4a8392b695
Reviewed-on: https://go-review.googlesource.com/11033
Run-TryBot: David du Colombier <0intro@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/os_test.go

index 3c0dfd194d0c457c39e6273283bc781744c1bf30..afb30fd84480a9529dc1f83a808b64d33bb9cb95 100644 (file)
@@ -1251,7 +1251,10 @@ func testWindowsHostname(t *testing.T) {
 func TestHostname(t *testing.T) {
        // There is no other way to fetch hostname on windows, but via winapi.
        // On Plan 9 it can be taken from #c/sysname as Hostname() does.
-       if runtime.GOOS == "windows" {
+       switch runtime.GOOS {
+       case "plan9":
+               t.Skipf("skipping on %s", runtime.GOOS)
+       case "windows":
                testWindowsHostname(t)
                return
        }