]> Cypherpunks repositories - gostls13.git/commit
go/internal/gcimporter: in short tests, avoid creating export data for all of std
authorBryan C. Mills <bcmills@google.com>
Thu, 1 Dec 2022 20:37:50 +0000 (15:37 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 2 Dec 2022 19:26:51 +0000 (19:26 +0000)
commita79b55bb9a5f459fd8d518223022a6d307354a27
tree933b2a333353819e70a1e5c7ba0249ce5e92c376
parent3e2ab204a39b97e1abeda78d1442be90f48752b0
go/internal/gcimporter: in short tests, avoid creating export data for all of std

gcimporter.TestImportTypeparamTests still needs to create full export
data because it loads lots of source files from GOROOT/test that
expect to be able to import arbitrary subsets of the standard library,
so we now skip it in short mode.

On a clean build cache, this reduces
'go test -short cmd/compile/internal/importer go/internal/gcimporter'
on my machine from 21–28s per test to <6s per test.

Updates #56967.
Updates #47257.

Change-Id: I8fd80293ab135e0d2d213529b74e0ca6429cdfc7
Reviewed-on: https://go-review.googlesource.com/c/go/+/454498
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/compile/internal/importer/gcimporter_test.go
src/go/internal/gcimporter/gcimporter_test.go