mirror of
https://github.com/golang/go
synced 2024-11-23 20:40:07 -07:00
internal/reflectlite: skip TestMirrorWithReflect reflect package source is unavailable
Fixes #34847 Change-Id: Ibb58c8820cdab8b9f3755fcfba754ad0c9ca982f Reviewed-on: https://go-review.googlesource.com/c/go/+/200657 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
parent
d0f10a6e68
commit
d189bdd684
@ -87,6 +87,13 @@ func loadTypes(path, pkgName string, v visitor) {
|
||||
}
|
||||
|
||||
func TestMirrorWithReflect(t *testing.T) {
|
||||
reflectDir := filepath.Join(runtime.GOROOT(), "src", "reflect")
|
||||
if _, err := os.Stat(reflectDir); os.IsNotExist(err) {
|
||||
// On some mobile builders, the test binary executes on a machine without a
|
||||
// complete GOROOT source tree.
|
||||
t.Skipf("GOROOT source not present")
|
||||
}
|
||||
|
||||
var wg sync.WaitGroup
|
||||
rl, r := newVisitor(), newVisitor()
|
||||
|
||||
@ -95,7 +102,7 @@ func TestMirrorWithReflect(t *testing.T) {
|
||||
v visitor
|
||||
}{
|
||||
{".", "reflectlite", rl},
|
||||
{filepath.Join(runtime.GOROOT(), "src", "reflect"), "reflect", r},
|
||||
{reflectDir, "reflect", r},
|
||||
} {
|
||||
tc := tc
|
||||
wg.Add(1)
|
||||
|
Loading…
Reference in New Issue
Block a user