File tree 2 files changed +16
-0
lines changed
cmd/compile/internal/types2
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,14 @@ func firstComment(filename string) (first string) {
206
206
func testTestDir (t * testing.T , path string , ignore ... string ) {
207
207
files , err := os .ReadDir (path )
208
208
if err != nil {
209
+ // cmd/distpack deletes GOROOT/test, so skip the test if it isn't present.
210
+ // cmd/distpack also requires GOROOT/VERSION to exist, so use that to
211
+ // suppress false-positive skips.
212
+ if _ , err := os .Stat (filepath .Join (testenv .GOROOT (t ), "test" )); os .IsNotExist (err ) {
213
+ if _ , err := os .Stat (filepath .Join (testenv .GOROOT (t ), "VERSION" )); err == nil {
214
+ t .Skipf ("skipping: GOROOT/test not present" )
215
+ }
216
+ }
209
217
t .Fatal (err )
210
218
}
211
219
Original file line number Diff line number Diff line change @@ -209,6 +209,14 @@ func firstComment(filename string) string {
209
209
func testTestDir (t * testing.T , path string , ignore ... string ) {
210
210
files , err := os .ReadDir (path )
211
211
if err != nil {
212
+ // cmd/distpack deletes GOROOT/test, so skip the test if it isn't present.
213
+ // cmd/distpack also requires GOROOT/VERSION to exist, so use that to
214
+ // suppress false-positive skips.
215
+ if _ , err := os .Stat (filepath .Join (testenv .GOROOT (t ), "test" )); os .IsNotExist (err ) {
216
+ if _ , err := os .Stat (filepath .Join (testenv .GOROOT (t ), "VERSION" )); err == nil {
217
+ t .Skipf ("skipping: GOROOT/test not present" )
218
+ }
219
+ }
212
220
t .Fatal (err )
213
221
}
214
222
You can’t perform that action at this time.
0 commit comments