Merge Request #8

Open
jerasure/gf-complete!8
Created by Loic Dachary

enable lcov coverage reports

Assignee: None
Milestone: None
Checking for CI status for e1d35637
This can't be merged automatically, even if it could be merged you don't have the permission to do so.
This can be merged automatically but you don't have the permission to do so.
Commits (1)
1 participants
Makefile.am
... ... @@ -6,3 +6,12 @@ ACLOCAL_AMFLAGS = -I m4
6 6  
7 7 include_HEADERS = include/gf_complete.h include/gf_method.h include/gf_rand.h include/gf_general.h
8 8  
  9 +coverage:
  10 + lcov -d $(top_builddir) -z
  11 + lcov -d $(top_builddir) -c -i -o base_full.lcov
  12 + make -j4 check
  13 + lcov -d $(top_builddir) -c -o tested_full.lcov
  14 + lcov --remove base_full.lcov /usr/include\* /usr/lib\* -o base.lcov
  15 + lcov --remove tested_full.lcov /usr/include\* /usr/lib\* -o tested.lcov
  16 + lcov --add-tracefile base.lcov --add-tracefile tested.lcov -o result.lcov
  17 + rm -fr html ; genhtml -o html --baseline-file base.lcov tested.lcov
... ...
configure.ac
... ... @@ -60,5 +60,11 @@ AC_ARG_ENABLE([sse],
60 60 fi]
61 61 )
62 62  
  63 +AC_ARG_ENABLE([coverage],
  64 + [AS_HELP_STRING([--enable-coverage], [enable code coverage tracking])],
  65 + [],
  66 + [enable_coverage=no])
  67 +AM_CONDITIONAL(ENABLE_COVERAGE, test "x$enable_coverage" != xno)
  68 +
63 69 AC_CONFIG_FILES([Makefile src/Makefile tools/Makefile test/Makefile examples/Makefile])
64 70 AC_OUTPUT
... ...
src/Makefile.am
... ... @@ -5,6 +5,9 @@ AUTOMAKE_OPTIONS = subdir-objects
5 5  
6 6 AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
7 7 AM_CFLAGS = -O3 $(SIMD_FLAGS) -fPIC
  8 +if ENABLE_COVERAGE
  9 +AM_CFLAGS += -fprofile-arcs -ftest-coverage
  10 +endif
8 11  
9 12 lib_LTLIBRARIES = libgf_complete.la
10 13 libgf_complete_la_SOURCES = gf.c gf_method.c gf_wgen.c gf_w4.c gf_w8.c gf_w16.c gf_w32.c \
... ...
  • Loic avatar small 75dpi
    Loic Dachary @dachary

    Added 1 new commit:

    • 5d620b32 - add --enable-coverage to create lcov reports
    Choose File ...   File name...
    Cancel
  • Loic avatar small 75dpi
    Loic Dachary @dachary

    Added 1 new commit:

    • e1d35637 - add --enable-coverage to create lcov reports
    Choose File ...   File name...
    Cancel