@@ -187,7 +187,10 @@ fmt-check: ## Warn if any source needs reformatting
187187 @unformatted=$$(gofmt -l $(FMT_PATHS ) ) ; [ -z " $$ unformatted" ] && exit 0; echo " Unformatted:" ; for fn in $$ unformatted; do echo " $$ fn" ; done ; exit 1
188188
189189
190- gen-device : gen-device-avr gen-device-esp gen-device-nrf gen-device-sam gen-device-sifive gen-device-kendryte gen-device-nxp gen-device-rp gen-device-renesas # # Generate microcontroller-specific sources
190+ gen-device : gen-device-avr gen-device-esp gen-device-nrf gen-device-sam gen-device-sifive gen-device-kendryte gen-device-nxp gen-device-rp # # Generate microcontroller-specific sources
191+ ifneq ($(RENESAS ) , 0)
192+ gen-device : gen-device-renesas
193+ endif
191194ifneq ($(STM32 ) , 0)
192195gen-device : gen-device-stm32
193196endif
@@ -457,38 +460,42 @@ TEST_PACKAGES_HOST := $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_WINDOWS)
457460TEST_IOFS := false
458461endif
459462
463+ TEST_SKIP_FLAG := -skip='TestExtraMethods|TestParseAndBytesRoundTrip/P256/Generic'
464+
460465# Test known-working standard library packages.
461466# TODO: parallelize, and only show failing tests (no implied -v flag).
462467.PHONY : tinygo-test
463468tinygo-test :
464- $(TINYGO ) test $(TEST_PACKAGES_HOST ) $(TEST_PACKAGES_SLOW )
469+ @# TestExtraMethods: used by many crypto packages and uses reflect.Type.Method which is not implemented.
470+ @# TestParseAndBytesRoundTrip/P256/Generic: relies on t.Skip() which is not implemented
471+ $(TINYGO ) test $(TEST_SKIP_FLAG ) $(TEST_PACKAGES_HOST ) $(TEST_PACKAGES_SLOW )
465472 @# io/fs requires os.ReadDir, not yet supported on windows or wasi. It also
466473 @# requires a large stack-size. Hence, io/fs is only run conditionally.
467474 @# For more details, see the comments on issue #3143.
468475ifeq ($(TEST_IOFS ) ,true)
469476 $(TINYGO) test -stack-size=6MB io/fs
470477endif
471478tinygo-test-fast :
472- $(TINYGO ) test $(TEST_PACKAGES_HOST )
479+ $(TINYGO ) test $(TEST_SKIP_FLAG ) $( TEST_PACKAGES_HOST )
473480tinygo-bench :
474481 $(TINYGO ) test -bench . $(TEST_PACKAGES_HOST ) $(TEST_PACKAGES_SLOW )
475482tinygo-bench-fast :
476483 $(TINYGO ) test -bench . $(TEST_PACKAGES_HOST )
477484
478485# Same thing, except for wasi rather than the current platform.
479486tinygo-test-wasm :
480- $(TINYGO ) test -target wasm $(TEST_PACKAGES_WASM )
487+ $(TINYGO ) test -target wasm $(TEST_SKIP_FLAG ) $( TEST_PACKAGES_WASM )
481488tinygo-test-wasi :
482- $(TINYGO ) test -target wasip1 $(TEST_PACKAGES_FAST ) $(TEST_PACKAGES_SLOW ) ./tests/runtime_wasi
489+ $(TINYGO ) test -target wasip1 $(TEST_SKIP_FLAG ) $( TEST_PACKAGES_FAST ) $(TEST_PACKAGES_SLOW ) ./tests/runtime_wasi
483490tinygo-test-wasip1 :
484- GOOS=wasip1 GOARCH=wasm $(TINYGO ) test $(TEST_PACKAGES_FAST ) $(TEST_PACKAGES_SLOW ) ./tests/runtime_wasi
491+ GOOS=wasip1 GOARCH=wasm $(TINYGO ) test $(TEST_SKIP_FLAG ) $( TEST_PACKAGES_FAST ) $(TEST_PACKAGES_SLOW ) ./tests/runtime_wasi
485492tinygo-test-wasip1-fast :
486- $(TINYGO ) test -target=wasip1 $(TEST_PACKAGES_FAST ) ./tests/runtime_wasi
493+ $(TINYGO ) test -target=wasip1 $(TEST_SKIP_FLAG ) $( TEST_PACKAGES_FAST ) ./tests/runtime_wasi
487494
488495tinygo-test-wasip2-slow :
489- $(TINYGO ) test -target=wasip2 $(TEST_PACKAGES_SLOW )
496+ $(TINYGO ) test -target=wasip2 $(TEST_SKIP_FLAG ) $( TEST_PACKAGES_SLOW )
490497tinygo-test-wasip2-fast :
491- $(TINYGO ) test -target=wasip2 $(TEST_PACKAGES_FAST ) ./tests/runtime_wasi
498+ $(TINYGO ) test -target=wasip2 $(TEST_SKIP_FLAG ) $( TEST_PACKAGES_FAST ) ./tests/runtime_wasi
492499
493500tinygo-test-wasip2-sum-slow :
494501 TINYGO=$(TINYGO ) \
@@ -514,7 +521,7 @@ tinygo-bench-wasip2-fast:
514521
515522# Run tests on riscv-qemu since that one provides a large amount of memory.
516523tinygo-test-baremetal :
517- $(TINYGO ) test -target riscv-qemu $(TEST_PACKAGES_BAREMETAL )
524+ $(TINYGO ) test -target riscv-qemu $(TEST_SKIP_FLAG ) $( TEST_PACKAGES_BAREMETAL )
518525
519526# Test external packages in a large corpus.
520527test-corpus :
@@ -778,6 +785,8 @@ endif
778785 @$(MD5SUM) test.hex
779786 $(TINYGO) build -size short -o test.hex -target=pico-plus2 examples/blinky1
780787 @$(MD5SUM) test.hex
788+ $(TINYGO) build -size short -o test.hex -target=metro-rp2350 examples/blinky1
789+ @$(MD5SUM) test.hex
781790 $(TINYGO) build -size short -o test.hex -target=waveshare-rp2040-tiny examples/echo
782791 @$(MD5SUM) test.hex
783792 # test pwm
@@ -837,6 +846,8 @@ ifneq ($(STM32), 0)
837846 @$(MD5SUM) test.hex
838847 $(TINYGO) build -size short -o test.hex -target=mksnanov3 examples/blinky1
839848 @$(MD5SUM) test.hex
849+ $(TINYGO) build -size short -o test.hex -target=stm32l0x1 examples/serial
850+ @$(MD5SUM) test.hex
840851endif
841852 $(TINYGO) build -size short -o test.hex -target=atmega328pb examples/blinkm
842853 @$(MD5SUM) test.hex
@@ -907,7 +918,7 @@ endif
907918 $(TINYGO) build -size short -o test.hex -target=hw-651 examples/machinetest
908919 @$(MD5SUM) test.hex
909920 $(TINYGO) build -size short -o test.hex -target=hw-651-s110v8 examples/machinetest
910- @$(MD5SUM) test.hex
921+ @$(MD5SUM) test.hex
911922ifneq ($(WASM ) , 0)
912923 $(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/export
913924 $(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/main
@@ -963,6 +974,7 @@ build/release: tinygo gen-device $(if $(filter 1,$(USE_SYSTEM_BINARYEN)),,binary
963974 @mkdir -p build/release/tinygo/lib/nrfx
964975 @mkdir -p build/release/tinygo/lib/picolibc/newlib/libc
965976 @mkdir -p build/release/tinygo/lib/picolibc/newlib/libm
977+ @mkdir -p build/release/tinygo/lib/wasi-libc/dlmalloc
966978 @mkdir -p build/release/tinygo/lib/wasi-libc/libc-bottom-half
967979 @mkdir -p build/release/tinygo/lib/wasi-libc/libc-top-half/musl/arch
968980 @mkdir -p build/release/tinygo/lib/wasi-libc/libc-top-half/musl/src
@@ -1034,6 +1046,7 @@ endif
10341046 @cp -rp lib/picolibc/newlib/libm/common build/release/tinygo/lib/picolibc/newlib/libm
10351047 @cp -rp lib/picolibc/newlib/libm/math build/release/tinygo/lib/picolibc/newlib/libm
10361048 @cp -rp lib/picolibc-stdio.c build/release/tinygo/lib
1049+ @cp -rp lib/wasi-libc/dlmalloc/src build/release/tinygo/lib/wasi-libc/dlmalloc
10371050 @cp -rp lib/wasi-libc/libc-bottom-half/cloudlibc build/release/tinygo/lib/wasi-libc/libc-bottom-half
10381051 @cp -rp lib/wasi-libc/libc-bottom-half/headers build/release/tinygo/lib/wasi-libc/libc-bottom-half
10391052 @cp -rp lib/wasi-libc/libc-bottom-half/sources build/release/tinygo/lib/wasi-libc/libc-bottom-half
0 commit comments