diff options
author | Felix Lange <fjl@twurst.com> | 2019-09-11 20:41:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-11 20:41:22 +0800 |
commit | 39b0b1a1a6506c8c25fcff56f4d70a85739dcb6a (patch) | |
tree | 9a490d5d860a2cefdeb4c3c60a9def3d88cabbe9 /internal | |
parent | 91b73495098c7941e3eb1c58a702952bf5acf1a6 (diff) | |
download | go-tangerine-39b0b1a1a6506c8c25fcff56f4d70a85739dcb6a.tar go-tangerine-39b0b1a1a6506c8c25fcff56f4d70a85739dcb6a.tar.gz go-tangerine-39b0b1a1a6506c8c25fcff56f4d70a85739dcb6a.tar.bz2 go-tangerine-39b0b1a1a6506c8c25fcff56f4d70a85739dcb6a.tar.lz go-tangerine-39b0b1a1a6506c8c25fcff56f4d70a85739dcb6a.tar.xz go-tangerine-39b0b1a1a6506c8c25fcff56f4d70a85739dcb6a.tar.zst go-tangerine-39b0b1a1a6506c8c25fcff56f4d70a85739dcb6a.zip |
all: make unit tests work with Go 1.13 (#20053)
Most of these changes are related to the Go 1.13 changes to test binary
flag handling.
* cmd/geth: make attach tests more reliable
This makes the test wait for the endpoint to come up by polling
it instead of waiting for two seconds.
* tests: fix test binary flags for Go 1.13
Calling flag.Parse during package initialization is prohibited
as of Go 1.13 and causes test failures. Call it in TestMain instead.
* crypto/ecies: remove useless -dump flag in tests
* p2p/simulations: fix test binary flags for Go 1.13
Calling flag.Parse during package initialization is prohibited
as of Go 1.13 and causes test failures. Call it in TestMain instead.
* build: remove workaround for ./... vendor matching
This workaround was necessary for Go 1.8. The Go 1.9 release changed
the expansion rules to exclude vendored packages.
* Makefile: use relative path for GOBIN
This makes the "Run ./build/bin/..." line look nicer.
* les: fix test binary flags for Go 1.13
Calling flag.Parse during package initialization is prohibited
as of Go 1.13 and causes test failures. Call it in TestMain instead.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/build/util.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/internal/build/util.go b/internal/build/util.go index 971d948c4..a1f456777 100644 --- a/internal/build/util.go +++ b/internal/build/util.go @@ -153,32 +153,6 @@ func GoTool(tool string, args ...string) *exec.Cmd { return exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), args...) } -// ExpandPackagesNoVendor expands a cmd/go import path pattern, skipping -// vendored packages. -func ExpandPackagesNoVendor(patterns []string) []string { - expand := false - for _, pkg := range patterns { - if strings.Contains(pkg, "...") { - expand = true - } - } - if expand { - cmd := GoTool("list", patterns...) - out, err := cmd.CombinedOutput() - if err != nil { - log.Fatalf("package listing failed: %v\n%s", err, string(out)) - } - var packages []string - for _, line := range strings.Split(string(out), "\n") { - if !strings.Contains(line, "/vendor/") { - packages = append(packages, strings.TrimSpace(line)) - } - } - return packages - } - return patterns -} - // UploadSFTP uploads files to a remote host using the sftp command line tool. // The destination host may be specified either as [user@]host[: or as a URI in // the form sftp://[user@]host[:port]. |