From b2a45014612beb0f1a79342d1921d5ea0fb2af2d Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 30 Sep 2024 11:55:23 +1000 Subject: [PATCH] qemu/Makefile: Add test_full target to run a comprehensive test suite. The tests now include `--via-mpy` and `--via-mpy --emit native`, which will test more cases of the native emitter under both ARM and RISC-V. Signed-off-by: Damien George --- ports/qemu/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ports/qemu/Makefile b/ports/qemu/Makefile index c8c07965f..b792ee8ca 100644 --- a/ports/qemu/Makefile +++ b/ports/qemu/Makefile @@ -128,6 +128,8 @@ CFLAGS += $(SPECS_FRAGMENT) LDFLAGS += $(SPECS_FRAGMENT) endif +RUN_TESTS_FULL_ARGS = -t execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) -serial pty -kernel ../ports/qemu/$<" $(RUN_TESTS_ARGS) + ################################################################################ # Source files and libraries @@ -169,8 +171,13 @@ run: $(BUILD)/firmware.elf .PHONY: test test: $(BUILD)/firmware.elf - $(eval DIRNAME=ports/$(notdir $(CURDIR))) - cd $(TOP)/tests && ./run-tests.py -t execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) -serial pty -kernel ../$(DIRNAME)/$<" $(RUN_TESTS_ARGS) $(RUN_TESTS_EXTRA) + cd $(TOP)/tests && ./run-tests.py $(RUN_TESTS_FULL_ARGS) $(RUN_TESTS_EXTRA) + +.PHONY: test_full +test_full: $(BUILD)/firmware.elf + cd $(TOP)/tests && ./run-tests.py $(RUN_TESTS_FULL_ARGS) + 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 .PHONY: test_natmod test_natmod: $(BUILD)/firmware.elf