build: enable code coverage

Enable code coverage for the project.  Valgrind not enabled in this
step.

Change-Id: I519bac32acc58ba388dc3724e187255d3237c085
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 3f78dda..e5ea1ff 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,18 +1,23 @@
+@CODE_COVERAGE_RULES@
+
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/ \
 	-I$(top_srcdir)/tools/ \
 	$(GTEST_CFLAGS) \
-	$(GMOCK_CFLAGS)
+	$(GMOCK_CFLAGS) \
+	$(CODE_COVERAGE_CPPFLAGS)
 AM_CXXFLAGS = \
 	$(SDBUSPLUS_CFLAGS) \
-	$(PHOSPHOR_LOGGING_CFLAGS)
+	$(PHOSPHOR_LOGGING_CFLAGS) \
+	$(CODE_COVERAGE_CXXFLAGS)
 AM_LDFLAGS = \
 	$(GTEST_LIBS) \
 	$(GMOCK_LIBS) \
 	-lgmock_main \
 	$(OESDK_TESTCASE_FLAGS) \
 	$(SDBUSPLUS_LIBS) \
-	$(PHOSPHOR_LOGGING_LIBS)
+	$(PHOSPHOR_LOGGING_LIBS) \
+	$(CODE_COVERAGE_LIBS)
 
 # Run all 'check' test programs
 check_PROGRAMS = \