diff --git a/main_test.go b/main_test.go index b7dfa6b0f..4316c2dae 100644 --- a/main_test.go +++ b/main_test.go @@ -273,6 +273,10 @@ 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" + _, goMinor, err := goenv.GetGorootVersion() + if err != nil { + t.Fatal("could not get version:", goMinor) + } for _, name := range tests { if options.GOOS == "linux" && (options.GOARCH == "arm" || options.GOARCH == "386") { @@ -296,6 +300,11 @@ func runPlatTests(options compileopts.Options, tests []string, t *testing.T) { continue } } + if options.Target == "cortex-m-qemu" && goMinor >= 27 && name == "json.go" { + // Go 1.27 jsonv2 exceeds the LM3S6965's 256KiB flash. json.go + // is still covered by larger targets such as riscv-qemu. + continue + } if options.Target == "simavr" { // Not all tests are currently supported on AVR. // Skip the ones that aren't.