• Caio Marcelo de Oliveira Filho's avatar
    cmd/go, testing: indicate when no tests are run · ead08e91
    Caio Marcelo de Oliveira Filho authored
    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/22341Reviewed-by: 's avatarMarcel van Lohuizen <mpvl@golang.org>
    ead08e91
Name
Last commit
Last update
..
cgocover Loading commit data...
failssh Loading commit data...
generate Loading commit data...
importcom Loading commit data...
local Loading commit data...
norunexample Loading commit data...
rundir Loading commit data...
shadow Loading commit data...
src Loading commit data...
testimport Loading commit data...
testinternal Loading commit data...
testinternal2 Loading commit data...
testinternal3 Loading commit data...
testinternal4/src Loading commit data...
testonly Loading commit data...
testvendor/src Loading commit data...
testvendor2 Loading commit data...
dep_test.go Loading commit data...
example1_test.go Loading commit data...
example2_test.go Loading commit data...
flag_test.go Loading commit data...
standalone_benchmark_test.go Loading commit data...
standalone_fail_sub_test.go Loading commit data...
standalone_parallel_sub_test.go Loading commit data...
standalone_sub_test.go Loading commit data...
standalone_test.go Loading commit data...