unix/Makefile: Run all possible tests when using --via-mpy.

Currently testing on the unix port with `--via-mpy` only runs tests in the
`basics`, `float` and `micropython` test directories.

This commit removes that restriction and now runs `--via-mpy` tests using
all possible test directories.  This improves test coverage.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2025-09-16 12:56:30 +10:00
parent 4d905ef552
commit e031ead6b2

View File

@@ -278,16 +278,15 @@ test/%: $(BUILD)/$(PROG) $(TOP)/tests/run-tests.py
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(BUILD)/$(PROG) ./run-tests.py -d "$*"
test_full_no_native: $(BUILD)/$(PROG) $(TOP)/tests/run-tests.py
test_full_no_native: $(BUILD)/$(PROG) $(TOP)/tests/run-tests.py test
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(BUILD)/$(PROG) ./run-tests.py
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(BUILD)/$(PROG) ./run-tests.py --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS) -d basics float micropython
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(BUILD)/$(PROG) ./run-tests.py --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS)
cat $(TOP)/tests/basics/0prelim.py | ./$(BUILD)/$(PROG) | grep -q 'abc'
test_full: $(BUILD)/$(PROG) $(TOP)/tests/run-tests.py test_full_no_native
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(BUILD)/$(PROG) ./run-tests.py --emit native
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(BUILD)/$(PROG) ./run-tests.py --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS) --emit native -d basics float micropython
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(BUILD)/$(PROG) ./run-tests.py --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS) --emit native
test_gcov: test_full
gcov -o $(BUILD)/py $(TOP)/py/*.c