Skip to content

Commit a6bcc8e

Browse files
committed
main_test: skip flaky concurrency tests on threaded schedulers
1 parent 1a1506e commit a6bcc8e

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

main_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,21 @@ func runPlatTests(options compileopts.Options, tests []string, t *testing.T) {
264264
isWASI := strings.HasPrefix(options.Target, "wasi")
265265
isWebAssembly := isWASI || strings.HasPrefix(options.Target, "wasm") || (options.Target == "" && strings.HasPrefix(options.GOARCH, "wasm"))
266266
isBaremetal := options.Target == "simavr" || options.Target == "cortex-m-qemu" || options.Target == "riscv-qemu"
267+
scheduler := options.Scheduler
268+
if scheduler == "" {
269+
scheduler = spec.Scheduler
270+
}
267271

268272
for _, name := range tests {
273+
if scheduler == "threads" || scheduler == "cores" {
274+
switch name {
275+
case "goroutines.go", "timers.go":
276+
// These tests intentionally check concurrent scheduling by
277+
// comparing output order, which is not deterministic with
278+
// threaded schedulers.
279+
continue
280+
}
281+
}
269282
if options.GOOS == "linux" && (options.GOARCH == "arm" || options.GOARCH == "386") {
270283
switch name {
271284
case "timers.go":

0 commit comments

Comments
 (0)