aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.main8
-rw-r--r--external/gard/Makefile4
-rw-r--r--external/pflash/Makefile4
3 files changed, 16 insertions, 0 deletions
diff --git a/Makefile.main b/Makefile.main
index 15c9067..096a58d 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -225,9 +225,17 @@ include $(SRC)/libstb/Makefile.inc
gard:
(cd external/gard; CROSS_COMPILE="" CFLAGS="$(HOSTCFLAGS) $(HOSTGCOVCFLAGS)" make)
+coverage: gard-coverage
+gard-coverage:
+ (cd external/gard; CROSS_COMPILE="" CFLAGS="$(HOSTCFLAGS) $(HOSTGCOVCFLAGS)" make coverage)
+
pflash:
(cd external/pflash; CROSS_COMPILE="" CFLAGS="$(HOSTCFLAGS) $(HOSTGCOVCFLAGS)" make)
+coverage: pflash-coverage
+pflash-coverage:
+ (cd external/pflash; CROSS_COMPILE="" CFLAGS="$(HOSTCFLAGS) $(HOSTGCOVCFLAGS)" make coverage)
+
pflash-coverity:
(cd external/pflash; ./build-all-arch.sh)
diff --git a/external/gard/Makefile b/external/gard/Makefile
index 2ccd144..50589cf 100644
--- a/external/gard/Makefile
+++ b/external/gard/Makefile
@@ -5,6 +5,10 @@ include ../../external/common/rules.mk
all: links arch_links $(EXE)
+.PHONY: coverage
+coverage: CFLAGS += -fprofile-arcs -ftest-coverage
+coverage: check
+
#Rebuild version.o so that the the version always matches
#what the test suite will get from ./make_version.sh
check: version.o all
diff --git a/external/pflash/Makefile b/external/pflash/Makefile
index 5395bdf..243de6e 100644
--- a/external/pflash/Makefile
+++ b/external/pflash/Makefile
@@ -4,6 +4,10 @@ include ../../external/common/rules.mk
all: links arch_links $(EXE)
+.PHONY: coverage
+coverage: CFLAGS += -fprofile-arcs -ftest-coverage
+coverage: check
+
#Rebuild version.o so that the the version always matches
#what the test suite will get from ./make_version.sh
check: version.o all