summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2025-01-24 11:18:39 +0100
committerDamien George <damien@micropython.org>2025-02-07 17:37:04 +1100
commitca3090a33f06da57221827ad506d80cb1f826b99 (patch)
tree0a243894dff1980d9f90e15df480b746c11df065
parentdfd1d69a72956e650af5cb071e4d9be61b5d322a (diff)
qemu/Makefile: Fix shell interpolation for automated natmod tests.
This commit fixes the command used to run natmod tests, as it relied on a string interpolation feature of the POSIX shell that was not working as expected inside a makefile. The interpolation was not performed from inside the makefile and the raw command string was sent to the operating system for execution. Now the command is run by using a different type of string substitution, which explicitly performs the interpolation using a POSIX shell for-loop. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
-rw-r--r--ports/qemu/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/ports/qemu/Makefile b/ports/qemu/Makefile
index d2550cf88..befef5d52 100644
--- a/ports/qemu/Makefile
+++ b/ports/qemu/Makefile
@@ -189,11 +189,14 @@ test_full: $(BUILD)/firmware.elf
cd $(TOP)/tests && ./run-tests.py $(RUN_TESTS_FULL_ARGS) --via-mpy
cd $(TOP)/tests && ./run-tests.py $(RUN_TESTS_FULL_ARGS) --via-mpy --emit native
+# "btree" currently does not build for rv32imc (Picolibc TLS incompatibility).
.PHONY: test_natmod
test_natmod: $(BUILD)/firmware.elf
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
- # "btree" cannot build against Picolibc right now.
- cd $(TOP)/tests && ./run-natmodtests.py -p -d execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) -serial pty -kernel ../$(DIRNAME)/$<" $(RUN_NATMODTESTS_ARGS) extmod/{deflate,framebuf,heapq,random_basic,re}*.py
+ cd $(TOP)/tests && \
+ for natmod in deflate framebuf heapq random_basic re; do \
+ ./run-natmodtests.py -p -d execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) -serial pty -kernel ../$(DIRNAME)/$<" extmod/$$natmod*.py; \
+ done
$(BUILD)/firmware.elf: $(LDSCRIPT) $(OBJ)
$(Q)$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)