Commit b1be1217 authored by David du Colombier's avatar David du Colombier

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 7387121d
...@@ -1251,7 +1251,10 @@ func testWindowsHostname(t *testing.T) { ...@@ -1251,7 +1251,10 @@ func testWindowsHostname(t *testing.T) {
func TestHostname(t *testing.T) { func TestHostname(t *testing.T) {
// There is no other way to fetch hostname on windows, but via winapi. // 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. // 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) testWindowsHostname(t)
return return
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment