diff options
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | Makefile.test | 9 |
2 files changed, 22 insertions, 7 deletions
@@ -35,20 +35,29 @@ prog : design.bin CALL_TESTS = \ cd tests/; \ - for TEST in *; do \ + for TEST in $(1); do \ echo "** $$TEST "; \ - if ! $(MAKE) -C $$TEST $(1) 3>&1 1>/dev/null 2>&3; then \ + if ! $(MAKE) -C $$TEST $(2) 3>&1 1>/dev/null 2>&3; then \ FAIL=true; \ fi; \ done; \ [ "$$FAIL" != true ] test : - $(call CALL_TESTS) + $(call CALL_TESTS,*) # Will skip VGA tests, because they take loooong time quicktest : - $(call CALL_TESTS,QUICK_TEST=1) + $(call CALL_TESTS,*,QUICK_TEST=1) + +stack_machine_test : + $(call CALL_TESTS,stack_machine_*) + +stack_machine_quicktest : + $(call CALL_TESTS,stack_machine_*,QUICK_TEST=1) + +wasm_compile_test : + $(call CALL_TESTS,wasm_compile_*) $(TEST_TARGETS) : test_% : $(MAKE) -C tests/$* @@ -66,4 +75,5 @@ clean : $(MAKE) -C tools/ clean >/dev/null rm $(addprefix design.,v json asc bin) timing.rpt 2>/dev/null || true -.PHONY : all tools test quicktest $(TEST_TARGETS) $(TOOLS_TARGETS) +.PHONY : all tools test quicktest stack_machine_test stack_machine_quicktest \ + wasm_compile_test $(TEST_TARGETS) $(TOOLS_TARGETS) tools diff --git a/Makefile.test b/Makefile.test index 46af49a..787489c 100644 --- a/Makefile.test +++ b/Makefile.test @@ -11,6 +11,7 @@ MACROASM_FLAGS += -I$(PROJ_DIR)/include/ -E include $(PROJ_DIR)/Makefile.config include $(PROJ_DIR)/Makefile.util +include $(PROJ_DIR)/tools/Makefile.tools ifdef DEBUG IVFLAGS += -DDEBUG @@ -42,7 +43,9 @@ ifdef VGA_TEST endif endif -$(PROJ_DIR)/% : +TOOLS_TARGETS = $(addprefix $(PROJ_DIR)/tools/,$(TOOLS)) + +$(TOOLS_TARGETS) : $(PROJ_DIR)/% : $(MAKE) -C $(PROJ_DIR) $* %.mem : %.memv @@ -70,4 +73,6 @@ clean : rm $(GENERATED_MEM_FILES) *.vvp *.wasm report.log VGAdump.mem \ VGAdump.ppm 2>/dev/null || true -.PHONY : test clean +.PHONY : test clean $(TOOLS_TARGETS) + +.SECONDARY : $(TOOLS_TARGETS) |