]> Cypherpunks repositories - gostls13.git/commit
go/internal/gcimporter: fix TestImportStdLib
authorMichael Matloob <matloob@golang.org>
Wed, 30 Nov 2022 17:53:13 +0000 (12:53 -0500)
committerMichael Matloob <matloob@golang.org>
Thu, 1 Dec 2022 20:48:36 +0000 (20:48 +0000)
commit8ed74ee39afab11012460fa3e54dd6b83a6439c0
tree8035d8276503994869a75396007d43eaf477ae22
parent8fd2875c3e9455df722dd3c930332591eebbb3c2
go/internal/gcimporter: fix TestImportStdLib

The test attempted to find all stdlib packages by scanning
pkg/$GOOS_$GOARCH for .a files and then tried to import all of them.
Now that .a files are no longer being placed there, the test is a
noop. Fix this by using go list std (and filtering out testonly
packages) and trying to import all of those to recreate what the test
intended to do.

This also removes a dependency on the pkg/$GOOS_$GOARCH directory
which will stop being produced by dist in CL 453496.

For #47257

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