]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go, testing: indicate when no tests are run
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 20 Apr 2016 17:29:30 +0000 (14:29 -0300)
committerRuss Cox <rsc@golang.org>
Wed, 19 Oct 2016 02:34:44 +0000 (02:34 +0000)
commitead08e91f6468ab1c35c250ec487935103c580f6
tree6d9c2630e8ed00379d543aef06dc2d57f4355194
parent95abb5a36aa1a727db512772f632ecaf05df34aa
cmd/go, testing: indicate when no tests are run

For example, testing the current directory:

$ go test -run XXX
testing: warning: no tests to run
PASS
ok   testing 0.013s
$

And in a summary:

$ go test -run XXX testing
ok   testing 0.013s [no tests to run]
$

These make it easy to spot when the -run regexp hasn't matched anything
or there are no tests. Previously the message was printed in the "current directory"
case when there were no tests at all, but not for no matches, and either way
was not surfaced in the directory list summary form.

Fixes #15211.

Change-Id: I1c82a423d6bd429fb991c9ca964c9d26c96fd3c5
Reviewed-on: https://go-review.googlesource.com/22341
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
src/cmd/go/go_test.go
src/cmd/go/test.go
src/cmd/go/testdata/standalone_benchmark_test.go [new file with mode: 0644]
src/cmd/go/testdata/standalone_fail_sub_test.go [new file with mode: 0644]
src/cmd/go/testdata/standalone_parallel_sub_test.go [new file with mode: 0644]
src/cmd/go/testdata/standalone_sub_test.go [new file with mode: 0644]
src/testing/benchmark.go
src/testing/example.go
src/testing/testing.go