Skip to content

Commit e89823e

Browse files
committed
x/tools/go/internal/gcimporter: exclude a file from TestImportTypeparamTests
Matching change for the corresponding file in CL 353389. To make the builds pass for now. For golang/go#48424. Change-Id: Id66837957ffec4e4b19faa0337a7587ea8bd6125 Reviewed-on: https://go-review.googlesource.com/c/tools/+/353395 Trust: Robert Griesemer <[email protected]> Run-TryBot: Robert Griesemer <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Robert Findley <[email protected]> gopls-CI: kokoro <[email protected]>
1 parent 1c35f2a commit e89823e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

go/internal/gcimporter/iexport_go118_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,34 @@ func TestImportTypeparamTests(t *testing.T) {
8080
t.Skip("unified export data format is currently unsupported")
8181
}
8282

83+
skip := map[string]string{
84+
"issue48424.go": "go/types support missing", // TODO: need to implement this if #48424 is accepted
85+
}
86+
8387
for _, entry := range list {
8488
if entry.IsDir() || !strings.HasSuffix(entry.Name(), ".go") {
8589
// For now, only consider standalone go files.
8690
continue
8791
}
8892

8993
t.Run(entry.Name(), func(t *testing.T) {
94+
if reason, ok := skip[entry.Name()]; ok {
95+
t.Skip(reason)
96+
}
97+
9098
filename := filepath.Join(rootDir, entry.Name())
9199
src, err := os.ReadFile(filename)
92100
if err != nil {
93101
t.Fatal(err)
94102
}
103+
95104
if !bytes.HasPrefix(src, []byte("// run")) && !bytes.HasPrefix(src, []byte("// compile")) {
96105
// We're bypassing the logic of run.go here, so be conservative about
97106
// the files we consider in an attempt to make this test more robust to
98107
// changes in test/typeparams.
99108
t.Skipf("not detected as a run test")
100109
}
110+
101111
testExportSrc(t, src)
102112
})
103113
}

0 commit comments

Comments
 (0)