]> Cypherpunks repositories - gostls13.git/commitdiff
go/types, types2: remove mechanism to exclude tests for unified build
authorRobert Griesemer <gri@golang.org>
Wed, 16 Mar 2022 22:17:36 +0000 (15:17 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 21 Mar 2022 19:10:35 +0000 (19:10 +0000)
The unified build will become the norm and the excluded tests run now.

Change-Id: I0f0873eb73483a4f04736d167d2eb796ee8a857b
Reviewed-on: https://go-review.googlesource.com/c/go/+/393438
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/types2/check_test.go
src/go/types/check_test.go

index 7efa512164444d88706f8227ee52fab8638a700a..5d491a3e166053905090301141e3aa71315537ae 100644 (file)
@@ -25,7 +25,6 @@ package types2_test
 import (
        "cmd/compile/internal/syntax"
        "flag"
-       "internal/buildcfg"
        "internal/testenv"
        "os"
        "path/filepath"
@@ -94,28 +93,11 @@ func asGoVersion(s string) string {
        return ""
 }
 
-// excludedForUnifiedBuild lists files that cannot be tested
-// when using the unified build's export data.
-// TODO(gri) enable as soon as the unified build supports this.
-var excludedForUnifiedBuild = map[string]bool{
-       "issue47818.go2": true,
-       "issue49705.go2": true,
-}
-
 func testFiles(t *testing.T, filenames []string, colDelta uint, manual bool) {
        if len(filenames) == 0 {
                t.Fatal("no source files")
        }
 
-       if buildcfg.Experiment.Unified {
-               for _, f := range filenames {
-                       if excludedForUnifiedBuild[filepath.Base(f)] {
-                               t.Logf("%s cannot be tested with unified build - skipped", f)
-                               return
-                       }
-               }
-       }
-
        var mode syntax.Mode
        if strings.HasSuffix(filenames[0], ".go2") || manual {
                mode |= syntax.AllowGenerics | syntax.AllowMethodTypeParams
index 81ea81ca4ed0ca798435212d86a8cea9e960ac0d..b96158a660653f9ec6c119beaa35817d43eba5ea 100644 (file)
@@ -31,7 +31,6 @@ import (
        "go/parser"
        "go/scanner"
        "go/token"
-       "internal/buildcfg"
        "internal/testenv"
        "os"
        "path/filepath"
@@ -200,28 +199,11 @@ func asGoVersion(s string) string {
        return ""
 }
 
-// excludedForUnifiedBuild lists files that cannot be tested
-// when using the unified build's export data.
-// TODO(gri) enable as soon as the unified build supports this.
-var excludedForUnifiedBuild = map[string]bool{
-       "issue47818.go2": true,
-       "issue49705.go2": true,
-}
-
 func testFiles(t *testing.T, sizes Sizes, filenames []string, srcs [][]byte, manual bool, imp Importer) {
        if len(filenames) == 0 {
                t.Fatal("no source files")
        }
 
-       if buildcfg.Experiment.Unified {
-               for _, f := range filenames {
-                       if excludedForUnifiedBuild[filepath.Base(f)] {
-                               t.Logf("%s cannot be tested with unified build - skipped", f)
-                               return
-                       }
-               }
-       }
-
        if strings.HasSuffix(filenames[0], ".go1") {
                // TODO(rfindley): re-enable this test by using GoVersion.
                t.Skip("type params are enabled")