mirror_frr/doc
Arthur Jones 8328420909 unit tests: support code coverage instrumentation and reports
Currently, make check runs the unit tests and reports pass/fail,
but we have no way to guage how much of the code is covered by
these tests.  gcov provides those statistics on a per source
file basis, but requires special CFLAGS and LDFLAGS.  Here, we
add the --enable-gcov configure option to setup those options
correctly.  We also add a make target called check-coverage,
which runs the unit tests, runs gcov and uploads the data to
the codecov.io cloud service for display.

Finally, we include a Dockerfile-coverage which creates a
container image in alpine linux to run the tests.  To create
the image:

$ docker build \
	--build-arg commit=`git rev-parse HEAD` \
	--build-arg token=<upload token from codecov.io> \
	-t frr-gcov:latest \
	-f docker/alpine/Dockerfile-coverage .

and to create and upload the report:

$ docker run -it --rm frr-gcov:latest

Testing done:

Created and uploaded a report from my fork using alpine linux 3.7.
Non-coverage alpine 3.7 build still works.

Issue: https://github.com/FRRouting/frr/issues/2442
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
2018-07-04 11:06:11 -07:00
..
developer doc: update workflow.rst 2018-06-15 18:38:38 +00:00
extra doc: spelling fixes 2018-04-20 17:59:38 -04:00
figures doc: add figures & fix some typos in arch. docs 2018-05-03 12:31:06 -04:00
manpages doc: move -r option docs to zebra only 2018-05-22 17:55:20 +00:00
mpls Update documentation for Traffic Engineering 2016-09-03 11:05:51 -04:00
user unit tests: support code coverage instrumentation and reports 2018-07-04 11:06:11 -07:00
.gitignore doc: update .gitignore 2018-03-07 13:59:15 -05:00
frr-sphinx.mk doc: support VPATH builds 2018-05-02 17:15:31 -04:00
Makefile.am doc: update EXTRA_DIST 2018-06-08 07:54:25 +00:00