From b20187196f2674c736bb89d9dde741c93bec3255 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 8 Mar 2016 15:58:20 +0000 Subject: [PATCH] os/user: skip Current test on android Also, add more failure output to debug why linux/mips64le and linux/ppc64 are failing. They should be working. I suspect their builder test envs are missing something. Change-Id: I97273fe72c4e3009db400394636d0da1ef147485 Reviewed-on: https://go-review.googlesource.com/20358 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Reviewed-by: Hyang-Ah Hana Kim Reviewed-by: Ian Lance Taylor --- src/os/user/lookup_stubs.go | 2 +- src/os/user/user_test.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/os/user/lookup_stubs.go b/src/os/user/lookup_stubs.go index 7ff4829516..ebf24f79de 100644 --- a/src/os/user/lookup_stubs.go +++ b/src/os/user/lookup_stubs.go @@ -43,7 +43,7 @@ func current() (*User, error) { if u.Uid != "" && u.Username != "" && u.HomeDir != "" { return u, nil } - return nil, fmt.Errorf("user: Current not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) + return u, fmt.Errorf("user: Current not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } func lookupUser(username string) (*User, error) { diff --git a/src/os/user/user_test.go b/src/os/user/user_test.go index 122051d959..222b339544 100644 --- a/src/os/user/user_test.go +++ b/src/os/user/user_test.go @@ -16,9 +16,12 @@ func checkUser(t *testing.T) { } func TestCurrent(t *testing.T) { + if runtime.GOOS == "android" { + t.Skipf("skipping on %s", runtime.GOOS) + } u, err := Current() if err != nil { - t.Fatalf("Current: %v", err) + t.Fatalf("Current: %v (got %#v)", err, u) } if u.HomeDir == "" { t.Errorf("didn't get a HomeDir") -- 2.48.1