Skip to content

Commit 530f5f7

Browse files
committed
Makefile: Add dependencies for test targets
1 parent 8ec1374 commit 530f5f7

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ $(MODULES_PATH)/%.mpy:
7878
ARCH=$(ARCH) MPY_DIR=$(MPY_DIR_ABS) CFLAGS_EXTRA=$(CFLAGS_EXTRA) \
7979
V=1 $($(*)_CONFIG) dist
8080

81-
check_unix_natmod: $(MODULE_MPYS)
81+
# Collect test files for dependency tracking
82+
TEST_PY := $(wildcard tests/test_*.py)
83+
84+
check_unix_natmod: $(MODULE_MPYS) $(TEST_PY)
8285
MICROPYPATH=$(MODULES_PATH) $(MICROPYTHON_BIN) tests/test_all.py
8386

8487
$(PORT_DIR):
@@ -108,7 +111,7 @@ $(WEBASSEMBLY_MICROPYTHON): $(PORT_DIR) $(SRC_ALL) src/manifest_webassembly.py
108111
webassembly: $(WEBASSEMBLY_MICROPYTHON)
109112

110113

111-
check_unix: $(UNIX_MICROPYTHON)
114+
check_unix: $(UNIX_MICROPYTHON) $(TEST_PY)
112115
$(UNIX_MICROPYTHON) tests/test_all.py test_iir,test_fft,test_arrayutils,test_linreg,test_logreg
113116
# TODO: enable more modules
114117

0 commit comments

Comments
 (0)