[Skiboot] [PATCH] */test/*: Added '<subdir>-check' make targets

Oliver O'Halloran oohall at gmail.com
Mon Jan 18 11:27:29 AEDT 2016


Currently these exist for some parts of the source tree, but not all of it. They're nice if you are only modifing code in a one part of the tree as the full test suite can be a little slow.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 core/test/Makefile.check     | 13 ++++++++-----
 hdata/test/Makefile.check    |  9 +++++++--
 hw/ipmi/test/Makefile.check  |  7 +++++--
 libc/test/Makefile.check     |  7 +++++--
 libflash/test/Makefile.check |  7 +++++--
 5 files changed, 30 insertions(+), 13 deletions(-)

diff --git a/core/test/Makefile.check b/core/test/Makefile.check
index 2724aab..0818092 100644
--- a/core/test/Makefile.check
+++ b/core/test/Makefile.check
@@ -24,13 +24,16 @@ CORE_TEST_NOSTUB += core/test/run-console-log-pr_fmt
 LCOV_EXCLUDE += $(CORE_TEST:%=%.c) core/test/stubs.c
 LCOV_EXCLUDE += $(CORE_TEST_NOSTUB:%=%.c) /usr/include/*
 
-check: $(CORE_TEST:%=%-check) $(CORE_TEST:%=%-gcov-run)
+.PHONY : core-check
+core-check: $(CORE_TEST:%=%-check) $(CORE_TEST:%=%-gcov-run)
+core-check: $(CORE_TEST_NOSTUB:%=%-check) $(CORE_TEST_NOSTUB:%=%-gcov-run)
 
-check: $(CORE_TEST_NOSTUB:%=%-check) $(CORE_TEST_NOSTUB:%=%-gcov-run)
+.PHONY : core-coverage
+core-coverage: $(CORE_TEST:%=%-gcov-run)
+core-coverage: $(CORE_TEST_NOSTUB:%=%-gcov-run)
 
-coverage: $(CORE_TEST:%=%-gcov-run)
-
-coverage: $(CORE_TEST_NOSTUB:%=%-gcov-run)
+check: core-check
+coverage: core-coverage
 
 $(CORE_TEST:%=%-gcov-run) : %-run: %
 	$(call Q, TEST-COVERAGE ,$< , $<)
diff --git a/hdata/test/Makefile.check b/hdata/test/Makefile.check
index 6575276..52f5e43 100644
--- a/hdata/test/Makefile.check
+++ b/hdata/test/Makefile.check
@@ -2,8 +2,13 @@
 
 HDATA_TEST := hdata/test/hdata_to_dt
 
-check: $(HDATA_TEST:%=%-check) $(HDATA_TEST:%=%-gcov-run)
-coverage: $(HDATA_TEST:%=%-gcov-run)
+.PHONY : hdata-check hdata-coverage
+hdata-check: $(HDATA_TEST:%=%-check)
+hdata-coverage: $(HDATA_TEST:%=%-gcov-run)
+
+check: hdata-check hdata-coverage
+coverage: hdata-coverage
+
 LCOV_EXCLUDE += $(HDATA_TEST:%=%.c) hdata/test/stubs.c
 LCOV_EXCLUDE += /usr/include/valgrind/memcheck.h
 
diff --git a/hw/ipmi/test/Makefile.check b/hw/ipmi/test/Makefile.check
index 0669b3e..1f7f405 100644
--- a/hw/ipmi/test/Makefile.check
+++ b/hw/ipmi/test/Makefile.check
@@ -3,9 +3,12 @@ IPMI_TEST := hw/ipmi/test/run-fru
 
 LCOV_EXCLUDE += $(IPMI_TEST:%=%.c)
 
-check: $(IPMI_TEST:%=%-check) $(IPMI_TEST:%=%-gcov-run)
+.PHONY : hw-ipmp-check hw-ipmp-coverage
+hw-ipmp-check: $(IPMI_TEST:%=%-check) $(IPMI_TEST:%=%-gcov-run)
+hw-ipmp-coverage: $(IPMI_TEST:%=%-gcov-run)
 
-coverage: $(IPMI_TEST:%=%-gcov-run)
+check: hw-ipmp-check
+coverage: hw-ipmi-coverage
 
 $(IPMI_TEST:%=%-gcov-run) : %-run: %
 	$(call Q, TEST-COVERAGE ,$< , $<)
diff --git a/libc/test/Makefile.check b/libc/test/Makefile.check
index eb6fac8..b757f2f 100644
--- a/libc/test/Makefile.check
+++ b/libc/test/Makefile.check
@@ -11,9 +11,12 @@ LIBC_DUALLIB_TEST := libc/test/run-snprintf \
 
 LCOV_EXCLUDE += $(LIBC_TEST:%=%.c) $(LIBC_DUALLIB_TEST:%=%.c) $(LIBC_DUALLIB_TEST:%=%-test.c)
 
-check: $(LIBC_TEST:%=%-check) $(LIBC_DUALLIB_TEST:%=%-check)
+.PHONY : libc-check libc-coverage
+libc-check: $(LIBC_TEST:%=%-check) $(LIBC_DUALLIB_TEST:%=%-check)
+lib-coverage: $(LIBC_TEST:%=%-gcov-run) $(LIBC_DUALLIB_TEST:%=%-gcov-run)
 
-coverage: $(LIBC_TEST:%=%-gcov-run) $(LIBC_DUALLIB_TEST:%=%-gcov-run)
+check: libc-check
+coverage: libc-coverage
 
 $(LIBC_TEST:%=%-gcov-run) : %-run: %
 	$(call Q, TEST-COVERAGE ,$< , $<)
diff --git a/libflash/test/Makefile.check b/libflash/test/Makefile.check
index 05453b2..b90c359 100644
--- a/libflash/test/Makefile.check
+++ b/libflash/test/Makefile.check
@@ -3,9 +3,12 @@ LIBFLASH_TEST := libflash/test/test-flash libflash/test/test-ecc libflash/test/t
 
 LCOV_EXCLUDE += $(LIBFLASH_TEST:%=%.c)
 
-check: $(LIBFLASH_TEST:%=%-check) $(CORE_TEST:%=%-gcov-run)
+.PHONY : libflash-check libc-coverage
+libflash-check: $(LIBFLASH_TEST:%=%-check) $(CORE_TEST:%=%-gcov-run)
+libflash-coverage: $(LIBFLASH_TEST:%=%-gcov-run)
 
-coverage: $(LIBFLASH_TEST:%=%-gcov-run)
+check: libflash-check libc-coverage
+coverage: libflash-coverage
 
 $(LIBFLASH_TEST:%=%-gcov-run) : %-run: %
 	$(call Q, TEST-COVERAGE ,$< , $<)
-- 
2.5.0



More information about the Skiboot mailing list