• Russ Cox's avatar
    runtime/race: install alternate packages to temp dir · 2e2047a0
    Russ Cox authored
    The content-based staleness code means that
    
    	go run -gcflags=-l helloworld.go
    
    recompiles all of helloworld.go's dependencies with -gcflags=-l,
    whereas before it would have assumed installed packages were
    up-to-date. In this test, that means every race iteration rebuilds
    the runtime and maybe a few other packages. Instead, install them
    to a temporary location for reuse.
    
    This speeds the test from 17s to 9s on my MacBook Pro.
    
    Change-Id: Ied136ce72650261083bb19cc7dee38dac0ad05ca
    Reviewed-on: https://go-review.googlesource.com/73992Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
    2e2047a0
output_test.go 5.81 KB