mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
main_test: skip json on Cortex-M QEMU with Go 1.27
Go 1.27 jsonv2 pushes testdata/json.go beyond the LM3S6965 flash budget. Keep coverage on larger emulated targets while skipping only the too-small Cortex-M QEMU configuration.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user