Skip to content

Commit

Permalink
go/types,types2: exclude tests that need cgo.Incomplete
Browse files Browse the repository at this point in the history
Since when go/types,types2 do not know about build constraints, and
runtime/cgo.Incomplete is only available on platforms that support cgo.

These tests are also failing on aix with failure from linker, so disable
them on aix to make builder green. The fix for aix is tracked in #54814

Updates #46731
Updates #54814

Change-Id: I5d6f6e29a8196efc6c457ea64525350fc6b20309
Reviewed-on: https://go-review.googlesource.com/c/go/+/427394
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
Auto-Submit: Cuong Manh Le <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Cuong Manh Le <[email protected]>
  • Loading branch information
cuonglm authored and randall77 committed Sep 1, 2022
1 parent 91ef076 commit b5b2cf5
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 7 deletions.
9 changes: 9 additions & 0 deletions src/cmd/compile/internal/types2/stdlib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ func TestStdFixed(t *testing.T) {
"issue48230.go", // go/types doesn't check validity of //go:xxx directives
"issue49767.go", // go/types does not have constraints on channel element size
"issue49814.go", // go/types does not have constraints on array size

// These tests requires runtime/cgo.Incomplete, which is only available on some platforms.
// However, types2 does not know about build constraints.
"bug514.go",
"issue40954.go",
"issue42032.go",
"issue42076.go",
"issue46903.go",
"issue51733.go",
)
}

Expand Down
9 changes: 9 additions & 0 deletions src/go/types/stdlib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,15 @@ func TestStdFixed(t *testing.T) {
"issue48230.go", // go/types doesn't check validity of //go:xxx directives
"issue49767.go", // go/types does not have constraints on channel element size
"issue49814.go", // go/types does not have constraints on array size

// These tests requires runtime/cgo.Incomplete, which is only available on some platforms.
// However, go/types does not know about build constraints.
"bug514.go",
"issue40954.go",
"issue42032.go",
"issue42076.go",
"issue46903.go",
"issue51733.go",
)
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixedbugs/bug514.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build cgo
//go:build cgo && !aix

package main

Expand Down
2 changes: 1 addition & 1 deletion test/fixedbugs/issue40954.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build cgo
//go:build cgo && !aix

package main

Expand Down
2 changes: 1 addition & 1 deletion test/fixedbugs/issue42032.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// source code is governed by a BSD-style license that can be found in
// the LICENSE file.

//go:build cgo
//go:build cgo && !aix

package main

Expand Down
2 changes: 1 addition & 1 deletion test/fixedbugs/issue42076.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// source code is governed by a BSD-style license that can be found in
// the LICENSE file.

//go:build cgo
//go:build cgo && !aix

package main

Expand Down
3 changes: 1 addition & 2 deletions test/fixedbugs/issue46903.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// run
//go:build goexperiment.unified && cgo
// +build goexperiment.unified,cgo
//go:build goexperiment.unified && cgo && !aix

// TODO(mdempsky): Enable test unconditionally. This test should pass
// for non-unified mode too.
Expand Down
2 changes: 1 addition & 1 deletion test/fixedbugs/issue51733.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build cgo
//go:build cgo && !aix

package main

Expand Down

0 comments on commit b5b2cf5

Please sign in to comment.