From a55a5c8df3d8ced8f0399a523dc4508af1db5904 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 24 Feb 2012 12:52:15 +1100 Subject: [PATCH] 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 --- test/run.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/run.go b/test/run.go index 67ff4137177..4d4488a457d 100644 --- a/test/run.go +++ b/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,9 +110,12 @@ func main() { } } resCount[errStr]++ + if isSkip && !*verbose && !*showSkips { + continue + } if !*verbose && test.err == nil { continue - } + } fmt.Printf("%-10s %-20s: %s\n", test.action, test.goFileName(), errStr) }