From: David du Colombier <0intro@gmail.com> Date: Tue, 16 Jun 2015 21:42:23 +0000 (+0200) Subject: os: skip TestHostname on Plan 9 X-Git-Tag: go1.5beta1~233 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b1be1217914a3f3698eb1361e750fbb36fb96b2e;p=gostls13.git os: skip TestHostname on Plan 9 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 --- diff --git a/src/os/os_test.go b/src/os/os_test.go index 3c0dfd194d..afb30fd844 100644 --- a/src/os/os_test.go +++ b/src/os/os_test.go @@ -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 }