diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-12-27 13:42:58 +0200 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-12-27 13:42:58 +0200 |
commit | 7bde59183f40fe7540ab87a03429453b76e286c3 (patch) | |
tree | 60a2db357f119a3925ed6a6fb2925228a51307fa | |
parent | Add sched/roundrobin tests (diff) | |
download | kernel-7bde59183f40fe7540ab87a03429453b76e286c3.tar.xz |
Add test and valgrind targets to rules.mk
-rw-r--r-- | lib/Makefile | 8 | ||||
-rw-r--r-- | rules.mk | 8 | ||||
-rw-r--r-- | src/Makefile | 9 |
3 files changed, 12 insertions, 13 deletions
diff --git a/lib/Makefile b/lib/Makefile index b82d773..9b34c20 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -4,11 +4,7 @@ libk.SRCS = stdio/printf.c stdio/fprintf.c stdio/vfprintf.cpp \ stdlib/memcpy.c stdlib/memset.c stdlib/linked_list_allocator.c \ string/itoa.c -include ../rules.mk +TESTS += tst/test_mem tst/test_string tst/test_linked_list_allocator -.PHONY: test valgrind -test: tst/test_mem tst/test_string tst/test_linked_list_allocator - $(foreach f,$^,./$f;) +include ../rules.mk -valgrind: tst/test_mem tst/test_string tst/test_linked_list_allocator - $(foreach f,$^,valgrind --leak-check=full ./$f;) @@ -40,6 +40,14 @@ tst/test_%: tst/%.cc @echo ' CXX TEST $@' @$(TEST_CXX) $< -o $@ $(GTEST) $(GMOCK) +.PHONY: test valgrind +test: $(TESTS) + $(foreach f,$^,./$f;) + +valgrind: $(TESTS) + $(foreach f,$^,valgrind --leak-check=full ./$f;) + + # clean target .PHONY: clean FORCE clean: diff --git a/src/Makefile b/src/Makefile index df59f24..c3e4931 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,14 +3,9 @@ include ../Makefile.config kernel.SRCS := multiboot2.c mmap.c kernel.cpp mem/vmm.c kernel.OBJS := include conf.h -include ../rules.mk - -.PHONY: test valgrind -test: tst/test_taskqueue tst/test_roundrobin - $(foreach f,$^,./$f;) +TESTS += tst/test_taskqueue tst/test_roundrobin -valgrind: tst/test_taskqueue tst/test_roundrobin - $(foreach f,$^,valgrind --leak-check=full ./$f;) +include ../rules.mk conf.h: conf.h.in @echo ' GEN $@' |