]> Cypherpunks repositories - gostls13.git/commit
cmd/doc: use empty GOPATH when running the tests
authorDaniel Martí <mvdan@mvdan.cc>
Wed, 21 Mar 2018 12:36:58 +0000 (12:36 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 21 Mar 2018 13:43:22 +0000 (13:43 +0000)
commit77c3ef6f6fdb53708484e944f6ef37b222e1ae89
treecba18b00fd16d66b5c79519ecfeb4dc9aeb73d00
parent041c5d83486fce4a1c8b549a3c6f9c1951b0aea8
cmd/doc: use empty GOPATH when running the tests

Otherwise, a populated GOPATH might result in failures such as:

$ go test
[...] no buildable Go source files in [...]/gopherjs/compiler/natives/src/crypto/rand
exit status 1

Move the initialization of the dirs walker out of the init func, so that
we can control its behavior in the tests.

Updates #24464.

Change-Id: I4b26a7d3d6809bdd8e9b6b0556d566e7855f80fe
Reviewed-on: https://go-review.googlesource.com/101836
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/doc/dirs.go
src/cmd/doc/doc_test.go
src/cmd/doc/main.go
src/cmd/doc/pkg.go