build: enable code coverage
Enable code coverage given the tests. The current code coverage
configuration focuses on the lines that are tested, whether they're
tested, versus including missing things. It would seem.
Tested: Ran unit-tests.
Change-Id: Ie9d345de1105e35386d2aeb06cca2788f84db265
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index e754936..0468348 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,17 +1,23 @@
AM_CPPFLAGS = \
-I$(top_srcdir)/ \
$(GTEST_CFLAGS) \
- $(GMOCK_CFLAGS)
+ $(GMOCK_CFLAGS) \
+ $(CODE_COVERAGE_CPPFLAGS)
+AM_CFLAGS = \
+ $(CODE_COVERAGE_CFLAGS)
+AM_CXXFLAGS = \
+ $(CODE_COVERAGE_CXXFLAGS)
AM_LDFLAGS = \
$(GTEST_LIBS) \
$(GMOCK_LIBS) \
-lgmock_main \
- $(OESDK_TESTCASE_FLAGS)
+ $(OESDK_TESTCASE_FLAGS) \
+ $(CODE_COVERAGE_LIBS)
check_PROGRAMS =
TESTS = $(check_PROGRAMS)
check_PROGRAMS += ethstats_unittest
ethstats_unittest_SOURCES = ethstats_unittest.cpp
-ethstats_unittest_LDADD = $(top_builddir)/ethstats.o
+ethstats_unittest_LDADD = $(top_builddir)/libethstatscmds_common.la