mirror of
https://github.com/golang/go
synced 2024-11-23 05:50:05 -07:00
[dev.typeparams] test: run all errorcheck tests that pass compiler with -G flag
Replace existing ad-hoc file exclusion mechanism with list of excluded files; i.e., files for which the compiler with -G option doesn't produce matching error messages yet. Remove -G option since we now always run all passing tests. Change-Id: I0655d2cf8bc135b3f50b1a811b8f49090c427580 Reviewed-on: https://go-review.googlesource.com/c/go/+/275212 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
7a1aa7dfaf
commit
9ff27e9fad
303
test/run.go
303
test/run.go
@ -39,7 +39,6 @@ var (
|
|||||||
runSkips = flag.Bool("run_skips", false, "run skipped tests (ignore skip and build tags)")
|
runSkips = flag.Bool("run_skips", false, "run skipped tests (ignore skip and build tags)")
|
||||||
linkshared = flag.Bool("linkshared", false, "")
|
linkshared = flag.Bool("linkshared", false, "")
|
||||||
updateErrors = flag.Bool("update_errors", false, "update error messages in test file based on compiler output")
|
updateErrors = flag.Bool("update_errors", false, "update error messages in test file based on compiler output")
|
||||||
newTypechecker = flag.Bool("G", false, "generics typechecker. if set, run basic errorcheck tests also with new typechecker")
|
|
||||||
runoutputLimit = flag.Int("l", defaultRunOutputLimit(), "number of parallel runoutput tests to run")
|
runoutputLimit = flag.Int("l", defaultRunOutputLimit(), "number of parallel runoutput tests to run")
|
||||||
|
|
||||||
shard = flag.Int("shard", 0, "shard index to run. Only applicable if -shards is non-zero.")
|
shard = flag.Int("shard", 0, "shard index to run. Only applicable if -shards is non-zero.")
|
||||||
@ -742,10 +741,6 @@ func (t *test) run() {
|
|||||||
}
|
}
|
||||||
t.err = t.errorCheck(string(out), wantAuto, long, t.gofile)
|
t.err = t.errorCheck(string(out), wantAuto, long, t.gofile)
|
||||||
|
|
||||||
if t.err != nil || !*newTypechecker {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// The following is temporary scaffolding to get types2 typechecker
|
// The following is temporary scaffolding to get types2 typechecker
|
||||||
// up and running against the existing test cases. The explicitly
|
// up and running against the existing test cases. The explicitly
|
||||||
// listed files don't pass yet, usually because the error messages
|
// listed files don't pass yet, usually because the error messages
|
||||||
@ -755,53 +750,15 @@ func (t *test) run() {
|
|||||||
// We can get rid of this code once types2 is fully plugged in.
|
// We can get rid of this code once types2 is fully plugged in.
|
||||||
|
|
||||||
// For now we're done when we can't handle the file or some of the flags.
|
// For now we're done when we can't handle the file or some of the flags.
|
||||||
// The first goal is to eliminate the file list; the second goal is to
|
// The first goal is to eliminate the excluded list; the second goal is to
|
||||||
// eliminate the flag list.
|
// eliminate the flag list.
|
||||||
|
|
||||||
// Excluded files.
|
// Excluded files.
|
||||||
for _, file := range []string{
|
if excluded[t.goFileName()] {
|
||||||
"complit1",
|
if *verbose {
|
||||||
"const2",
|
fmt.Printf("excl\t%s\n", t.goFileName())
|
||||||
"convlit.go",
|
|
||||||
"copy1.go",
|
|
||||||
"ddd1.go",
|
|
||||||
"devirt.go",
|
|
||||||
"directive.go",
|
|
||||||
"float_lit3.go",
|
|
||||||
"func1.go",
|
|
||||||
"funcdup.go",
|
|
||||||
"funcdup2.go",
|
|
||||||
"import1.go",
|
|
||||||
"import5.go",
|
|
||||||
"import6.go",
|
|
||||||
"init.go",
|
|
||||||
"initializerr.go",
|
|
||||||
"initloop.go",
|
|
||||||
"makechan.go",
|
|
||||||
"makemap.go",
|
|
||||||
"makenew.go",
|
|
||||||
"map1.go",
|
|
||||||
"method2.go",
|
|
||||||
"method6.go",
|
|
||||||
"named1.go",
|
|
||||||
"rename1.go",
|
|
||||||
"runtime.go",
|
|
||||||
"shift1.go",
|
|
||||||
"slice3err.go",
|
|
||||||
"switch3.go",
|
|
||||||
"switch4.go",
|
|
||||||
"switch5.go",
|
|
||||||
"switch6.go",
|
|
||||||
"switch7.go",
|
|
||||||
"typecheck.go",
|
|
||||||
"typecheckloop.go",
|
|
||||||
"typeswitch3.go",
|
|
||||||
"undef.go",
|
|
||||||
"varerr.go",
|
|
||||||
} {
|
|
||||||
if strings.Contains(long, file) {
|
|
||||||
return // cannot handle file
|
|
||||||
}
|
}
|
||||||
|
return // cannot handle file yet
|
||||||
}
|
}
|
||||||
|
|
||||||
// Excluded flags.
|
// Excluded flags.
|
||||||
@ -824,6 +781,9 @@ func (t *test) run() {
|
|||||||
"nil",
|
"nil",
|
||||||
} {
|
} {
|
||||||
if strings.Contains(flag, pattern) {
|
if strings.Contains(flag, pattern) {
|
||||||
|
if *verbose {
|
||||||
|
fmt.Printf("excl\t%s\t%s\n", t.goFileName(), flags)
|
||||||
|
}
|
||||||
return // cannot handle flag
|
return // cannot handle flag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1952,3 +1912,250 @@ func overlayDir(dstRoot, srcRoot string) error {
|
|||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List of files that the compiler cannot errorcheck with the new typechecker (compiler -G option).
|
||||||
|
// Temporary scaffolding until we pass all the tests at which point this map can be removed.
|
||||||
|
var excluded = map[string]bool{
|
||||||
|
"complit1.go": true,
|
||||||
|
"const2.go": true,
|
||||||
|
"convlit.go": true,
|
||||||
|
"copy1.go": true,
|
||||||
|
"ddd1.go": true,
|
||||||
|
"devirt.go": true,
|
||||||
|
"directive.go": true,
|
||||||
|
"float_lit3.go": true,
|
||||||
|
"func1.go": true,
|
||||||
|
"funcdup.go": true,
|
||||||
|
"funcdup2.go": true,
|
||||||
|
"import1.go": true,
|
||||||
|
"import5.go": true,
|
||||||
|
"import6.go": true,
|
||||||
|
"init.go": true,
|
||||||
|
"initializerr.go": true,
|
||||||
|
"initloop.go": true,
|
||||||
|
"makechan.go": true,
|
||||||
|
"makemap.go": true,
|
||||||
|
"makenew.go": true,
|
||||||
|
"map1.go": true,
|
||||||
|
"method2.go": true,
|
||||||
|
"method6.go": true,
|
||||||
|
"named1.go": true,
|
||||||
|
"rename1.go": true,
|
||||||
|
"runtime.go": true,
|
||||||
|
"shift1.go": true,
|
||||||
|
"slice3err.go": true,
|
||||||
|
"switch3.go": true,
|
||||||
|
"switch4.go": true,
|
||||||
|
"switch5.go": true,
|
||||||
|
"switch6.go": true,
|
||||||
|
"switch7.go": true,
|
||||||
|
"typecheck.go": true,
|
||||||
|
"typecheckloop.go": true,
|
||||||
|
"typeswitch3.go": true,
|
||||||
|
"undef.go": true,
|
||||||
|
"varerr.go": true,
|
||||||
|
|
||||||
|
"fixedbugs/bug163.go": true,
|
||||||
|
"fixedbugs/bug176.go": true,
|
||||||
|
"fixedbugs/bug192.go": true,
|
||||||
|
"fixedbugs/bug193.go": true,
|
||||||
|
"fixedbugs/bug195.go": true,
|
||||||
|
"fixedbugs/bug213.go": true,
|
||||||
|
"fixedbugs/bug228.go": true,
|
||||||
|
"fixedbugs/bug229.go": true,
|
||||||
|
"fixedbugs/bug231.go": true,
|
||||||
|
"fixedbugs/bug251.go": true,
|
||||||
|
"fixedbugs/bug255.go": true,
|
||||||
|
"fixedbugs/bug256.go": true,
|
||||||
|
"fixedbugs/bug325.go": true,
|
||||||
|
"fixedbugs/bug326.go": true,
|
||||||
|
"fixedbugs/bug340.go": true,
|
||||||
|
"fixedbugs/bug342.go": true,
|
||||||
|
"fixedbugs/bug350.go": true,
|
||||||
|
"fixedbugs/bug351.go": true,
|
||||||
|
"fixedbugs/bug353.go": true,
|
||||||
|
"fixedbugs/bug357.go": true,
|
||||||
|
"fixedbugs/bug362.go": true,
|
||||||
|
"fixedbugs/bug371.go": true,
|
||||||
|
"fixedbugs/bug374.go": true,
|
||||||
|
"fixedbugs/bug379.go": true,
|
||||||
|
"fixedbugs/bug383.go": true,
|
||||||
|
"fixedbugs/bug385_64.go": true,
|
||||||
|
"fixedbugs/bug386.go": true,
|
||||||
|
"fixedbugs/bug388.go": true,
|
||||||
|
"fixedbugs/bug389.go": true,
|
||||||
|
"fixedbugs/bug390.go": true,
|
||||||
|
"fixedbugs/bug397.go": true,
|
||||||
|
"fixedbugs/bug412.go": true,
|
||||||
|
"fixedbugs/bug413.go": true,
|
||||||
|
"fixedbugs/bug416.go": true,
|
||||||
|
"fixedbugs/bug418.go": true,
|
||||||
|
"fixedbugs/bug459.go": true,
|
||||||
|
"fixedbugs/bug462.go": true,
|
||||||
|
"fixedbugs/bug463.go": true,
|
||||||
|
"fixedbugs/bug487.go": true,
|
||||||
|
"fixedbugs/issue10975.go": true,
|
||||||
|
"fixedbugs/issue11326.go": true,
|
||||||
|
"fixedbugs/issue11361.go": true,
|
||||||
|
"fixedbugs/issue11362.go": true,
|
||||||
|
"fixedbugs/issue11371.go": true,
|
||||||
|
"fixedbugs/issue11590.go": true,
|
||||||
|
"fixedbugs/issue11610.go": true,
|
||||||
|
"fixedbugs/issue11614.go": true,
|
||||||
|
"fixedbugs/issue11674.go": true,
|
||||||
|
"fixedbugs/issue11737.go": true,
|
||||||
|
"fixedbugs/issue13365.go": true,
|
||||||
|
"fixedbugs/issue13415.go": true,
|
||||||
|
"fixedbugs/issue13471.go": true,
|
||||||
|
"fixedbugs/issue13480.go": true,
|
||||||
|
"fixedbugs/issue13485.go": true,
|
||||||
|
"fixedbugs/issue13539.go": true,
|
||||||
|
"fixedbugs/issue13559.go": true,
|
||||||
|
"fixedbugs/issue14136.go": true,
|
||||||
|
"fixedbugs/issue14321.go": true,
|
||||||
|
"fixedbugs/issue14520.go": true,
|
||||||
|
"fixedbugs/issue14540.go": true,
|
||||||
|
"fixedbugs/issue14729.go": true,
|
||||||
|
"fixedbugs/issue15055.go": true,
|
||||||
|
"fixedbugs/issue15898.go": true,
|
||||||
|
"fixedbugs/issue16428.go": true,
|
||||||
|
"fixedbugs/issue16439.go": true,
|
||||||
|
"fixedbugs/issue16949.go": true,
|
||||||
|
"fixedbugs/issue17038.go": true,
|
||||||
|
"fixedbugs/issue17588.go": true,
|
||||||
|
"fixedbugs/issue17631.go": true,
|
||||||
|
"fixedbugs/issue17645.go": true,
|
||||||
|
"fixedbugs/issue18331.go": true,
|
||||||
|
"fixedbugs/issue18392.go": true,
|
||||||
|
"fixedbugs/issue18393.go": true,
|
||||||
|
"fixedbugs/issue19012.go": true,
|
||||||
|
"fixedbugs/issue19323.go": true,
|
||||||
|
"fixedbugs/issue19482.go": true,
|
||||||
|
"fixedbugs/issue19699b.go": true,
|
||||||
|
"fixedbugs/issue19880.go": true,
|
||||||
|
"fixedbugs/issue19947.go": true,
|
||||||
|
"fixedbugs/issue20185.go": true,
|
||||||
|
"fixedbugs/issue20227.go": true,
|
||||||
|
"fixedbugs/issue20233.go": true,
|
||||||
|
"fixedbugs/issue20245.go": true,
|
||||||
|
"fixedbugs/issue20298.go": true,
|
||||||
|
"fixedbugs/issue20415.go": true,
|
||||||
|
"fixedbugs/issue20529.go": true,
|
||||||
|
"fixedbugs/issue20749.go": true,
|
||||||
|
"fixedbugs/issue20780.go": true,
|
||||||
|
"fixedbugs/issue21273.go": true,
|
||||||
|
"fixedbugs/issue21882.go": true,
|
||||||
|
"fixedbugs/issue21979.go": true,
|
||||||
|
"fixedbugs/issue22200.go": true,
|
||||||
|
"fixedbugs/issue22200b.go": true,
|
||||||
|
"fixedbugs/issue22389.go": true,
|
||||||
|
"fixedbugs/issue22794.go": true,
|
||||||
|
"fixedbugs/issue22822.go": true,
|
||||||
|
"fixedbugs/issue22904.go": true,
|
||||||
|
"fixedbugs/issue22921.go": true,
|
||||||
|
"fixedbugs/issue23093.go": true,
|
||||||
|
"fixedbugs/issue23094.go": true,
|
||||||
|
"fixedbugs/issue23609.go": true,
|
||||||
|
"fixedbugs/issue23732.go": true,
|
||||||
|
"fixedbugs/issue23823.go": true,
|
||||||
|
"fixedbugs/issue24339.go": true,
|
||||||
|
"fixedbugs/issue24470.go": true,
|
||||||
|
"fixedbugs/issue25507.go": true,
|
||||||
|
"fixedbugs/issue25727.go": true,
|
||||||
|
"fixedbugs/issue25958.go": true,
|
||||||
|
"fixedbugs/issue26416.go": true,
|
||||||
|
"fixedbugs/issue26616.go": true,
|
||||||
|
"fixedbugs/issue27595.go": true,
|
||||||
|
"fixedbugs/issue28079b.go": true,
|
||||||
|
"fixedbugs/issue28079c.go": true,
|
||||||
|
"fixedbugs/issue28268.go": true,
|
||||||
|
"fixedbugs/issue28450.go": true,
|
||||||
|
"fixedbugs/issue29855.go": true,
|
||||||
|
"fixedbugs/issue30085.go": true,
|
||||||
|
"fixedbugs/issue30087.go": true,
|
||||||
|
"fixedbugs/issue31747.go": true,
|
||||||
|
"fixedbugs/issue32133.go": true,
|
||||||
|
"fixedbugs/issue32723.go": true,
|
||||||
|
"fixedbugs/issue33460.go": true,
|
||||||
|
"fixedbugs/issue34329.go": true,
|
||||||
|
"fixedbugs/issue35291.go": true,
|
||||||
|
"fixedbugs/issue38117.go": true,
|
||||||
|
"fixedbugs/issue38745.go": true,
|
||||||
|
"fixedbugs/issue3925.go": true,
|
||||||
|
"fixedbugs/issue4085a.go": true,
|
||||||
|
"fixedbugs/issue41247.go": true,
|
||||||
|
"fixedbugs/issue41440.go": true,
|
||||||
|
"fixedbugs/issue41500.go": true,
|
||||||
|
"fixedbugs/issue41575.go": true,
|
||||||
|
"fixedbugs/issue42058a.go": true,
|
||||||
|
"fixedbugs/issue42058b.go": true,
|
||||||
|
"fixedbugs/issue42075.go": true,
|
||||||
|
"fixedbugs/issue4215.go": true,
|
||||||
|
"fixedbugs/issue4232.go": true,
|
||||||
|
"fixedbugs/issue4251.go": true,
|
||||||
|
"fixedbugs/issue4429.go": true,
|
||||||
|
"fixedbugs/issue4452.go": true,
|
||||||
|
"fixedbugs/issue4458.go": true,
|
||||||
|
"fixedbugs/issue4470.go": true,
|
||||||
|
"fixedbugs/issue4517d.go": true,
|
||||||
|
"fixedbugs/issue4847.go": true,
|
||||||
|
"fixedbugs/issue4909a.go": true,
|
||||||
|
"fixedbugs/issue5609.go": true,
|
||||||
|
"fixedbugs/issue6402.go": true,
|
||||||
|
"fixedbugs/issue6403.go": true,
|
||||||
|
"fixedbugs/issue6500.go": true,
|
||||||
|
"fixedbugs/issue6572.go": true,
|
||||||
|
"fixedbugs/issue6703a.go": true,
|
||||||
|
"fixedbugs/issue6703b.go": true,
|
||||||
|
"fixedbugs/issue6703c.go": true,
|
||||||
|
"fixedbugs/issue6703d.go": true,
|
||||||
|
"fixedbugs/issue6703e.go": true,
|
||||||
|
"fixedbugs/issue6703f.go": true,
|
||||||
|
"fixedbugs/issue6703g.go": true,
|
||||||
|
"fixedbugs/issue6703h.go": true,
|
||||||
|
"fixedbugs/issue6703i.go": true,
|
||||||
|
"fixedbugs/issue6703j.go": true,
|
||||||
|
"fixedbugs/issue6703k.go": true,
|
||||||
|
"fixedbugs/issue6703l.go": true,
|
||||||
|
"fixedbugs/issue6703m.go": true,
|
||||||
|
"fixedbugs/issue6703n.go": true,
|
||||||
|
"fixedbugs/issue6703o.go": true,
|
||||||
|
"fixedbugs/issue6703p.go": true,
|
||||||
|
"fixedbugs/issue6703q.go": true,
|
||||||
|
"fixedbugs/issue6703r.go": true,
|
||||||
|
"fixedbugs/issue6703s.go": true,
|
||||||
|
"fixedbugs/issue6703t.go": true,
|
||||||
|
"fixedbugs/issue6703u.go": true,
|
||||||
|
"fixedbugs/issue6703v.go": true,
|
||||||
|
"fixedbugs/issue6703w.go": true,
|
||||||
|
"fixedbugs/issue6703x.go": true,
|
||||||
|
"fixedbugs/issue6703y.go": true,
|
||||||
|
"fixedbugs/issue6703z.go": true,
|
||||||
|
"fixedbugs/issue6750.go": true,
|
||||||
|
"fixedbugs/issue6772.go": true,
|
||||||
|
"fixedbugs/issue6889.go": true,
|
||||||
|
"fixedbugs/issue7129.go": true,
|
||||||
|
"fixedbugs/issue7150.go": true,
|
||||||
|
"fixedbugs/issue7153.go": true,
|
||||||
|
"fixedbugs/issue7223.go": true,
|
||||||
|
"fixedbugs/issue7310.go": true,
|
||||||
|
"fixedbugs/issue7525.go": true,
|
||||||
|
"fixedbugs/issue7525b.go": true,
|
||||||
|
"fixedbugs/issue7525c.go": true,
|
||||||
|
"fixedbugs/issue7525d.go": true,
|
||||||
|
"fixedbugs/issue7525e.go": true,
|
||||||
|
"fixedbugs/issue7742.go": true, // type-checking doesn't terminate
|
||||||
|
"fixedbugs/issue7746.go": true, // type-checking doesn't terminate
|
||||||
|
"fixedbugs/issue8501.go": true, // crashes
|
||||||
|
"fixedbugs/issue8507.go": true, // crashes
|
||||||
|
"fixedbugs/issue8183.go": true,
|
||||||
|
"fixedbugs/issue8385.go": true,
|
||||||
|
"fixedbugs/issue8438.go": true,
|
||||||
|
"fixedbugs/issue8440.go": true,
|
||||||
|
"fixedbugs/issue8745.go": true,
|
||||||
|
"fixedbugs/issue9083.go": true,
|
||||||
|
"fixedbugs/issue9370.go": true,
|
||||||
|
"fixedbugs/issue9432.go": true,
|
||||||
|
"fixedbugs/issue9521.go": true,
|
||||||
|
"fixedbugs/issue9634.go": true,
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user