• Brandon Bennett's avatar
    testing: add argument to list tests, benchmarks, and examples · ba8ff87d
    Brandon Bennett authored
    Some large testing/build systems require some form of test discovery before
    running tests.  This usually allows for analytics, history, and stats on a per
    tests basis.  Typically these systems are meant used in multi-language
    environments and the original source code is not known or available.
    
    This adds a -test.list option which takes a regular expression as an
    argument. Any tests, benchmarks, or examples that match that regular
    expression will be printed, one per line, to stdout and then the program
    will exit.
    
    Since subtests are named/discovered at run time this will only show
    top-level tests names and is a known limitation.
    
    Fixes #17209
    
    Change-Id: I7e607f5f4f084d623a1cae88a1f70e7d92b7f13e
    Reviewed-on: https://go-review.googlesource.com/41195Reviewed-by: 's avatarMarcel van Lohuizen <mpvl@golang.org>
    Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    ba8ff87d
Name
Last commit
Last update
..
internal/testdeps Loading commit data...
iotest Loading commit data...
quick Loading commit data...
allocs.go Loading commit data...
allocs_test.go Loading commit data...
benchmark.go Loading commit data...
benchmark_test.go Loading commit data...
cover.go Loading commit data...
example.go Loading commit data...
export_test.go Loading commit data...
helper_test.go Loading commit data...
helperfuncs_test.go Loading commit data...
match.go Loading commit data...
match_test.go Loading commit data...
sub_test.go Loading commit data...
testing.go Loading commit data...
testing_test.go Loading commit data...