Skip to content

Commit b201871

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent b212c68 commit b201871

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/os/user/lookup_stubs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func current() (*User, error) {
4343
if u.Uid != "" && u.Username != "" && u.HomeDir != "" {
4444
return u, nil
4545
}
46-
return nil, fmt.Errorf("user: Current not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
46+
return u, fmt.Errorf("user: Current not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
4747
}
4848

4949
func lookupUser(username string) (*User, error) {

src/os/user/user_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ func checkUser(t *testing.T) {
1616
}
1717

1818
func TestCurrent(t *testing.T) {
19+
if runtime.GOOS == "android" {
20+
t.Skipf("skipping on %s", runtime.GOOS)
21+
}
1922
u, err := Current()
2023
if err != nil {
21-
t.Fatalf("Current: %v", err)
24+
t.Fatalf("Current: %v (got %#v)", err, u)
2225
}
2326
if u.HomeDir == "" {
2427
t.Errorf("didn't get a HomeDir")

0 commit comments

Comments
 (0)