Skip to content

Commit 322f288

Browse files
committed
Allow disabling gorepo tests only on Windows
1 parent 9b8df5c commit 322f288

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/gorepo/run.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ import (
4646
//
4747
// TODO: Reduce these to zero or as close as possible.
4848
var knownFails = map[string]failReason{
49+
"fixedbugs/issue22083.go": {category: brokenOnWindows, desc: "stack trace differs on Windows"},
50+
4951
"fixedbugs/bug114.go": {desc: "fixedbugs/bug114.go:15:27: B32 (untyped int constant 4294967295) overflows int"},
5052
"fixedbugs/bug242.go": {desc: "bad map check 13 false false Error: fail"},
5153
"fixedbugs/bug260.go": {desc: "maybe unsupportedFeature, pointer arithm"},
@@ -169,6 +171,7 @@ const (
169171
unsureIfGopherJSSupportsThisFeature
170172
lowLevelRuntimeDifference // JavaScript runtime behaves differently from Go in ways that are difficult to work around.
171173
notApplicable // Test that doesn't need to run under GopherJS; it doesn't apply to the Go language in a general way.
174+
brokenOnWindows // Tests fail only on Windows
172175
)
173176

174177
type failReason struct {
@@ -287,7 +290,12 @@ func main() {
287290
status := "ok "
288291
errStr := ""
289292
// GOPHERJS.
290-
if _, ok := knownFails[filepath.ToSlash(test.goFileName())]; ok && test.err != nil {
293+
knownFail, ok := knownFails[filepath.ToSlash(test.goFileName())]
294+
if ok && runtime.GOOS != "windows" && knownFail.category == brokenOnWindows {
295+
// Only disable brokenOnWindows tests if we're running on Windows
296+
ok = false
297+
}
298+
if ok && test.err != nil {
291299
errStr = test.err.Error()
292300
test.err = nil
293301
status = "knfl" // knfl means known failure. Expect test to fail.

0 commit comments

Comments
 (0)