diff options
author | Wojciech Kosior <kwojtus@protonmail.com> | 2020-09-21 18:15:19 +0200 |
---|---|---|
committer | Wojciech Kosior <kwojtus@protonmail.com> | 2020-09-21 18:15:19 +0200 |
commit | aad5da27e720b325183189c8a52d901f34cd97b6 (patch) | |
tree | fd97d9a6cfaf264bc3d3bfe1efc7b3580fcc459e | |
parent | 91da5622c92020262d04c5624ff801243e827323 (diff) | |
download | AGH-engineering-thesis-aad5da27e720b325183189c8a52d901f34cd97b6.tar.gz AGH-engineering-thesis-aad5da27e720b325183189c8a52d901f34cd97b6.zip |
make running tests through Makefile more comfortable
-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) |