diff --git a/main_test.go b/main_test.go index aae0720f49..6076396832 100644 --- a/main_test.go +++ b/main_test.go @@ -265,8 +265,21 @@ func runPlatTests(options compileopts.Options, tests []string, t *testing.T) { isWASI := strings.HasPrefix(options.Target, "wasi") isWebAssembly := isWASI || strings.HasPrefix(options.Target, "wasm") || (options.Target == "" && strings.HasPrefix(options.GOARCH, "wasm")) isBaremetal := options.Target == "simavr" || options.Target == "cortex-m-qemu" || options.Target == "riscv-qemu" + scheduler := options.Scheduler + if scheduler == "" { + scheduler = spec.Scheduler + } for _, name := range tests { + if scheduler == "threads" || scheduler == "cores" { + switch name { + case "goroutines.go", "timers.go": + // These tests intentionally check concurrent scheduling by + // comparing output order, which is not deterministic with + // threaded schedulers. + continue + } + } if options.GOOS == "linux" && (options.GOARCH == "arm" || options.GOARCH == "386") { switch name { case "timers.go":