build: enable code coverage
Enable code coverage for the project. Valgrind not enabled in this
step.
Change-Id: I62891f6054e5e5315d7f150a1f3dcf619f2740db
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index e2809f3..3dfae00 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,10 +1,17 @@
+@CODE_COVERAGE_RULES@
+
AM_CPPFLAGS = \
-I$(top_srcdir)/ \
$(GTEST_CFLAGS) \
$(GMOCK_CFLAGS) \
$(SDBUSPLUS_CFLAGS) \
$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS)
+ $(PHOSPHOR_LOGGING_CFLAGS) \
+ $(CODE_COVERAGE_CPPFLAGS)
+AM_CFLAGS = \
+ $(CODE_COVERAGE_CFLAGS)
+AM_CXXFLAGS = \
+ $(CODE_COVERAGE_CXXFLAGS)
AM_LDFLAGS = \
$(GTEST_LIBS) \
$(GMOCK_LIBS) \
@@ -12,7 +19,8 @@
$(OESDK_TESTCASE_FLAGS) \
$(SDBUSPLUS_LIBS) \
$(PHOSPHOR_DBUS_INTERFACES_LIBS) \
- $(PHOSPHOR_LOGGING_LIBS)
+ $(PHOSPHOR_LOGGING_LIBS) \
+ $(CODE_COVERAGE_LIBS)
# Run all 'check' test programs
check_PROGRAMS = sensor_manager_unittest sensor_pluggable_unittest \