mirror of
https://github.com/golang/go
synced 2024-11-25 11:07:59 -07:00
test: add temporary show_skips flag.
To find test files with legacy headers. We can remove this flag once everything is converted. R=golang-dev, r CC=golang-dev https://golang.org/cl/5694060
This commit is contained in:
parent
54eec3db2c
commit
a55a5c8df3
13
test/run.go
13
test/run.go
@ -32,6 +32,7 @@ var (
|
||||
verbose = flag.Bool("v", false, "verbose. if set, parallelism is set to 1.")
|
||||
numParallel = flag.Int("n", 8, "number of parallel tests to run")
|
||||
summary = flag.Bool("summary", false, "show summary of results")
|
||||
showSkips = flag.Bool("show_skips", false, "show skipped tests")
|
||||
)
|
||||
|
||||
var (
|
||||
@ -98,13 +99,10 @@ func main() {
|
||||
for _, test := range tests {
|
||||
<-test.donec
|
||||
_, isSkip := test.err.(skipError)
|
||||
if isSkip {
|
||||
resCount["skip"]++
|
||||
if !*verbose {
|
||||
continue
|
||||
}
|
||||
}
|
||||
errStr := "pass"
|
||||
if isSkip {
|
||||
errStr = "skip"
|
||||
}
|
||||
if test.err != nil {
|
||||
errStr = test.err.Error()
|
||||
if !isSkip {
|
||||
@ -112,6 +110,9 @@ func main() {
|
||||
}
|
||||
}
|
||||
resCount[errStr]++
|
||||
if isSkip && !*verbose && !*showSkips {
|
||||
continue
|
||||
}
|
||||
if !*verbose && test.err == nil {
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user