]> Cypherpunks repositories - gostls13.git/commit
runtime/race: install alternate packages to temp dir
authorRuss Cox <rsc@golang.org>
Fri, 27 Oct 2017 17:45:50 +0000 (13:45 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 31 Oct 2017 13:20:41 +0000 (13:20 +0000)
commit2e2047a07fea81f65170eca9562a649ba2f5b11d
tree0c1c86f3b47c0838dfa2fd9e24b512f89a93728d
parent94471f6324d25e2562c9125aeeeb2af6f2a51fd4
runtime/race: install alternate packages to temp dir

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/73992
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/race/output_test.go