aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Sitnicki <jsitnicki@gmail.com>2015-01-11 15:07:22 +0100
committerAleksander Morgado <aleksander@aleksander.es>2015-01-11 19:32:43 +0100
commit7552030ef90004857b4535f835e19fe734b22a39 (patch)
tree8565c8684d90213d38888fed7f108ea24eb1dd4a /src
parentffe2106d4e556526119b89eedb62047fd8eab7de (diff)
build: add code coverage support
Build all targets, except for CLI tools (mmcli, uml290), with special flags needed for collecting code coverage information when the build has been configured with --enable-code-coverage. Three new targets are available in the top build directory: - `check-code-coverage' runs the test suite and generates a code coverage report, - `code-coverage-capture' generates a code coverage report from already collected data, which can come in handy when one wants to see code paths touched by a particular test, - `code-coverage-clean' removes the collected coverage data and the generated reports.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am3
-rw-r--r--src/tests/Makefile.am3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 6912b00e..3b545ee2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,6 +8,9 @@ udevrules_DATA = \
77-mm-usb-serial-adapters-greylist.rules \
80-mm-candidate.rules
+AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
+AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
+
noinst_LTLIBRARIES = libmodem-helpers.la libport.la
libmodem_helpers_la_CPPFLAGS = \
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index c52e4d1d..0804b14f 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -1,5 +1,8 @@
include $(top_srcdir)/gtester.make
+AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
+AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
+
noinst_PROGRAMS = \
test-modem-helpers \
test-charsets \