mirror of
https://github.com/golang/go
synced 2024-11-19 01:24:39 -07:00
go/loader: in stdlib_test, remove workaround for lack of vendoring
Change-Id: I058081ef596e8b5231321ef05d5256ec44cc58c6 Reviewed-on: https://go-review.googlesource.com/18214 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
108b52ee61
commit
b2a7698651
@ -7,8 +7,6 @@ package loader_test
|
|||||||
// This file enumerates all packages beneath $GOROOT, loads them, plus
|
// This file enumerates all packages beneath $GOROOT, loads them, plus
|
||||||
// their external tests if any, runs the type checker on them, and
|
// their external tests if any, runs the type checker on them, and
|
||||||
// prints some summary information.
|
// prints some summary information.
|
||||||
//
|
|
||||||
// Run test with GOMAXPROCS=8.
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
@ -28,17 +26,6 @@ import (
|
|||||||
"golang.org/x/tools/go/types"
|
"golang.org/x/tools/go/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The set of packages that transitively depend on cmd/internal/objfile,
|
|
||||||
// which uses vendoring, which go/loader does not yet support.
|
|
||||||
// TODO(adonovan): add support for vendoring and delete this.
|
|
||||||
var skip = map[string]bool{
|
|
||||||
"cmd/addr2line": true,
|
|
||||||
"cmd/internal/objfile": true,
|
|
||||||
"cmd/nm": true,
|
|
||||||
"cmd/objdump": true,
|
|
||||||
"cmd/pprof": true,
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestStdlib(t *testing.T) {
|
func TestStdlib(t *testing.T) {
|
||||||
if runtime.GOOS == "android" {
|
if runtime.GOOS == "android" {
|
||||||
t.Skipf("incomplete std lib on %s", runtime.GOOS)
|
t.Skipf("incomplete std lib on %s", runtime.GOOS)
|
||||||
@ -55,9 +42,6 @@ func TestStdlib(t *testing.T) {
|
|||||||
ctxt.GOPATH = "" // disable GOPATH
|
ctxt.GOPATH = "" // disable GOPATH
|
||||||
conf := loader.Config{Build: &ctxt}
|
conf := loader.Config{Build: &ctxt}
|
||||||
for _, path := range buildutil.AllPackages(conf.Build) {
|
for _, path := range buildutil.AllPackages(conf.Build) {
|
||||||
if skip[path] {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
conf.ImportWithTests(path)
|
conf.ImportWithTests(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user