Commit b2018719 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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 <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarHyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent b212c68b
......@@ -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) {
......
......@@ -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")
......
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