• Rob Pike's avatar
    cmd/vet: build the binary only once in the test · ebd96933
    Rob Pike authored
    Recent changes caused vet to build the binary for each Test function.
    This is wasteful and will become only more so as more tests are added.
    Use testing.Main to build only once.
    
    Verified that compilation errors still appear if the binary cannot be
    built.
    
    Before:
    	real	0m11.169s
    	user	0m18.328s
    	sys	0m2.152s
    
    After:
    	real	0m5.132s
    	user	0m9.404s
    	sys	0m1.168s
    
    Of course if the compiler were fast we might not notice, but vet is
    a big program and growing bigger all the time, as are the tests.
    
    Change-Id: I209a8fdcace94bc5cec946f5dd365d7191f44c02
    Reviewed-on: https://go-review.googlesource.com/14822Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    ebd96933
Name
Last commit
Last update
..
testdata Loading commit data...
whitelist Loading commit data...
asmdecl.go Loading commit data...
assign.go Loading commit data...
atomic.go Loading commit data...
bool.go Loading commit data...
buildtag.go Loading commit data...
composite.go Loading commit data...
copylock.go Loading commit data...
deadcode.go Loading commit data...
doc.go Loading commit data...
example.go Loading commit data...
main.go Loading commit data...
method.go Loading commit data...
nilfunc.go Loading commit data...
print.go Loading commit data...
rangeloop.go Loading commit data...
shadow.go Loading commit data...
shift.go Loading commit data...
structtag.go Loading commit data...
types.go Loading commit data...
unsafeptr.go Loading commit data...
unused.go Loading commit data...
vet_test.go Loading commit data...