mirror of
https://github.com/golang/go
synced 2024-11-18 20:54:40 -07:00
go/packages: drop pruned packages in tests of import graph
Explicitly listing the pruned packages ties the test to the details of how the testing package is implemented. That shouldn't matter, and it changes in CL 219639. This change makes it possible to work whether or not CL 219639 is committed. Updates golang/go#34129 Change-Id: I45875dadeaac42a1002e1329a1a762e340c5352c Reviewed-on: https://go-review.googlesource.com/c/tools/+/221657 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Changkun Ou <euryugasaki@gmail.com> Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
0983143fce
commit
71bfc1b943
@ -139,9 +139,6 @@ func testLoadImportsGraph(t *testing.T, exporter packagestest.Exporter) {
|
||||
golang.org/fake/subdir/d [golang.org/fake/subdir/d.test] -> math/bits
|
||||
golang.org/fake/subdir/d.test -> golang.org/fake/subdir/d [golang.org/fake/subdir/d.test]
|
||||
golang.org/fake/subdir/d.test -> golang.org/fake/subdir/d_test [golang.org/fake/subdir/d.test]
|
||||
golang.org/fake/subdir/d.test -> os (pruned)
|
||||
golang.org/fake/subdir/d.test -> testing (pruned)
|
||||
golang.org/fake/subdir/d.test -> testing/internal/testdeps (pruned)
|
||||
golang.org/fake/subdir/d_test [golang.org/fake/subdir/d.test] -> golang.org/fake/subdir/d [golang.org/fake/subdir/d.test]
|
||||
`[1:]
|
||||
|
||||
@ -178,9 +175,6 @@ func testLoadImportsGraph(t *testing.T, exporter packagestest.Exporter) {
|
||||
golang.org/fake/subdir/d [golang.org/fake/subdir/d.test] -> math/bits
|
||||
golang.org/fake/subdir/d.test -> golang.org/fake/subdir/d [golang.org/fake/subdir/d.test]
|
||||
golang.org/fake/subdir/d.test -> golang.org/fake/subdir/d_test [golang.org/fake/subdir/d.test]
|
||||
golang.org/fake/subdir/d.test -> os (pruned)
|
||||
golang.org/fake/subdir/d.test -> testing (pruned)
|
||||
golang.org/fake/subdir/d.test -> testing/internal/testdeps (pruned)
|
||||
golang.org/fake/subdir/d_test [golang.org/fake/subdir/d.test] -> golang.org/fake/subdir/d [golang.org/fake/subdir/d.test]
|
||||
`[1:]
|
||||
|
||||
@ -259,9 +253,6 @@ func testLoadImportsGraph(t *testing.T, exporter packagestest.Exporter) {
|
||||
golang.org/fake/subdir/d [golang.org/fake/subdir/d.test] -> math/bits
|
||||
golang.org/fake/subdir/d.test -> golang.org/fake/subdir/d [golang.org/fake/subdir/d.test]
|
||||
golang.org/fake/subdir/d.test -> golang.org/fake/subdir/d_test [golang.org/fake/subdir/d.test]
|
||||
golang.org/fake/subdir/d.test -> os (pruned)
|
||||
golang.org/fake/subdir/d.test -> testing (pruned)
|
||||
golang.org/fake/subdir/d.test -> testing/internal/testdeps (pruned)
|
||||
golang.org/fake/subdir/d_test [golang.org/fake/subdir/d.test] -> golang.org/fake/subdir/d [golang.org/fake/subdir/d.test]
|
||||
`[1:]
|
||||
|
||||
@ -303,9 +294,6 @@ func testLoadImportsTestVariants(t *testing.T, exporter packagestest.Exporter) {
|
||||
golang.org/fake/a [golang.org/fake/b.test] -> golang.org/fake/b [golang.org/fake/b.test]
|
||||
golang.org/fake/b.test -> golang.org/fake/b [golang.org/fake/b.test]
|
||||
golang.org/fake/b.test -> golang.org/fake/b_test [golang.org/fake/b.test]
|
||||
golang.org/fake/b.test -> os (pruned)
|
||||
golang.org/fake/b.test -> testing (pruned)
|
||||
golang.org/fake/b.test -> testing/internal/testdeps (pruned)
|
||||
golang.org/fake/b_test [golang.org/fake/b.test] -> golang.org/fake/a [golang.org/fake/b.test]
|
||||
`[1:]
|
||||
|
||||
@ -2672,7 +2660,6 @@ func importGraph(initial []*packages.Package) (string, map[string]*packages.Pack
|
||||
if isTestMain {
|
||||
switch imp.ID {
|
||||
case "os", "reflect", "testing", "testing/internal/testdeps":
|
||||
edges = append(edges, fmt.Sprintf("%s -> %s (pruned)", p, imp))
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user