Skip to content

x/tools/go/packages: TestLoadImportsGraph failure with custom GOCACHE #29445

@mvdan

Description

@mvdan
$ git describe --always
d00ac6d2
$ go version
go version devel +6a64efc250 Thu Dec 27 00:07:53 2018 +0000 linux/amd64
$ GOCACHE= go test
PASS
ok      golang.org/x/tools/go/packages  3.788s
$ GOCACHE=$HOME/go/cache go test
--- FAIL: TestLoadImportsGraph (0.38s)
    --- FAIL: TestLoadImportsGraph/GOPATH (0.20s)
        packages_test.go:191: golang.org/fake/subdir/d.test.Srcs = [4302876da86a8aae0c1669924daa223cafca60ef49ccaa060ae37e778d18f218-d], want [0.go]
    --- FAIL: TestLoadImportsGraph/Modules (0.17s)
        packages_test.go:191: golang.org/fake/subdir/d.test.Srcs = [4302876da86a8aae0c1669924daa223cafca60ef49ccaa060ae37e778d18f218-d], want [0.go]
FAIL
exit status 1
FAIL    golang.org/x/tools/go/packages  4.093s

Looks like the test hard-codes that cache paths are under the default go-build directory, which isn't always the case. Will try to send a CL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions