Skip to content

Commit

Permalink
os: skip TestHostname on Plan 9
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
0intro committed Jun 16, 2015
1 parent 7387121 commit b1be121
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/os/os_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b1be121

Please sign in to comment.