mirror of
https://github.com/golang/go
synced 2024-09-30 22:48:32 -06:00
go/ssa/interp: exclude "runtime" from the list of initial packages in the test
It now has a main() function, which was confusing the logic to find the entry point. LGTM=gri R=gri CC=golang-codereviews https://golang.org/cl/142860044
This commit is contained in:
parent
6c93dbff3e
commit
7de4da029c
@ -222,6 +222,9 @@ func run(t *testing.T, dir, input string, success successPredicate) bool {
|
||||
var mainPkg *ssa.Package
|
||||
var initialPkgs []*ssa.Package
|
||||
for _, info := range iprog.InitialPackages() {
|
||||
if info.Pkg.Path() == "runtime" {
|
||||
continue // not an initial package
|
||||
}
|
||||
p := prog.Package(info.Pkg)
|
||||
initialPkgs = append(initialPkgs, p)
|
||||
if mainPkg == nil && p.Func("main") != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user