]> Cypherpunks repositories - gostls13.git/commitdiff
go/types,cmd/compile/internal/types2: unskip std and cmd in TestStdlib
authorRob Findley <rfindley@google.com>
Fri, 7 May 2021 00:36:10 +0000 (20:36 -0400)
committerRobert Findley <rfindley@google.com>
Fri, 7 May 2021 02:17:32 +0000 (02:17 +0000)
CL 276272 accidentally skipped everything in TestStdlib while trying to
skip nested submodules of std and cmd.

For now, narrow the skip to just the problematic submodule rather than
trying to generalize. We can re-evaluate if it becomes a pattern to
vendor submodules in this way.

Fixes #46027

Change-Id: Ib355ff80dfbf17c3cf37d128a2f48d4216305267
Reviewed-on: https://go-review.googlesource.com/c/go/+/317869
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types2/stdlib_test.go
src/go/types/stdlib_test.go

index 7d6753e5c25b168c71ff80d5402bedc4a8279b20..cde35c17b6f717f97dd3781f914ee0fcfe0afc99 100644 (file)
@@ -204,6 +204,9 @@ func TestStdKen(t *testing.T) {
 // Package paths of excluded packages.
 var excluded = map[string]bool{
        "builtin": true,
+
+       // See #46027: some imports are missing for this submodule.
+       "crypto/ed25519/internal/edwards25519/field/_asm": true,
 }
 
 // typecheck typechecks the given package files.
@@ -301,13 +304,6 @@ func (w *walker) walk(dir string) {
                return
        }
 
-       // skip submodules, which might not be vendored
-       for _, f := range files {
-               if f.Name() == "go.mod" {
-                       return
-               }
-       }
-
        // apply pkgh to the files in directory dir
        // but ignore files directly under $GOROOT/src (might be temporary test files).
        if dir != filepath.Join(runtime.GOROOT(), "src") {
index b565956e086e0dee61ee50217764de81d6507089..3dea8dcf1ed731944dcd10d983e114e83d6ff31b 100644 (file)
@@ -200,6 +200,9 @@ func TestStdKen(t *testing.T) {
 // Package paths of excluded packages.
 var excluded = map[string]bool{
        "builtin": true,
+
+       // See #46027: some imports are missing for this submodule.
+       "crypto/ed25519/internal/edwards25519/field/_asm": true,
 }
 
 // typecheck typechecks the given package files.
@@ -306,13 +309,6 @@ func (w *walker) walk(dir string) {
                return
        }
 
-       // skip submodules, which might not be vendored
-       for _, f := range files {
-               if f.Name() == "go.mod" {
-                       return
-               }
-       }
-
        // apply pkgh to the files in directory dir
        // but ignore files directly under $GOROOT/src (might be temporary test files).
        if dir != filepath.Join(runtime.GOROOT(), "src") {