Restore unix Makefile functionality

This commit is contained in:
Jeff Epler 2023-10-02 07:26:09 -05:00
parent ac64e6d807
commit 499ea3f0e8
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 9 additions and 1 deletions

View File

@ -262,9 +262,17 @@ include $(TOP)/py/mkrules.mk
.PHONY: test test_full
# CIRCUITPY: these two targets are ours
.PHONY: print-failures clean-failures
print-failures clean-failures:
../../tests/run-tests.py --$@
# CIRCUITPY: support for passing args to run-tests, like `make test TEST_ARGS="basics/*.py"`
TEST_ARGS ?=
test: $(BUILD)/$(PROG) $(TOP)/tests/run-tests.py
$(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 $(TEST_ARGS)
test_full: $(BUILD)/$(PROG) $(TOP)/tests/run-tests.py
$(eval DIRNAME=ports/$(notdir $(CURDIR)))