Commit a55a5c8d authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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
parent 54eec3db
...@@ -32,6 +32,7 @@ var ( ...@@ -32,6 +32,7 @@ var (
verbose = flag.Bool("v", false, "verbose. if set, parallelism is set to 1.") verbose = flag.Bool("v", false, "verbose. if set, parallelism is set to 1.")
numParallel = flag.Int("n", 8, "number of parallel tests to run") numParallel = flag.Int("n", 8, "number of parallel tests to run")
summary = flag.Bool("summary", false, "show summary of results") summary = flag.Bool("summary", false, "show summary of results")
showSkips = flag.Bool("show_skips", false, "show skipped tests")
) )
var ( var (
...@@ -98,13 +99,10 @@ func main() { ...@@ -98,13 +99,10 @@ func main() {
for _, test := range tests { for _, test := range tests {
<-test.donec <-test.donec
_, isSkip := test.err.(skipError) _, isSkip := test.err.(skipError)
errStr := "pass"
if isSkip { if isSkip {
resCount["skip"]++ errStr = "skip"
if !*verbose {
continue
}
} }
errStr := "pass"
if test.err != nil { if test.err != nil {
errStr = test.err.Error() errStr = test.err.Error()
if !isSkip { if !isSkip {
...@@ -112,9 +110,12 @@ func main() { ...@@ -112,9 +110,12 @@ func main() {
} }
} }
resCount[errStr]++ resCount[errStr]++
if isSkip && !*verbose && !*showSkips {
continue
}
if !*verbose && test.err == nil { if !*verbose && test.err == nil {
continue continue
} }
fmt.Printf("%-10s %-20s: %s\n", test.action, test.goFileName(), errStr) fmt.Printf("%-10s %-20s: %s\n", test.action, test.goFileName(), errStr)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment