Exclude test files from the code coverage report

Link asn1c/tests with libasn1cskeletons.a in order to improve
skeletons coverage. When the skeleton files are copied the lcov will
report coverage for each copy separatly.
This commit is contained in:
Vasil Velichkov 2016-07-19 02:23:04 +03:00 committed by Lev Walkin
parent e318759ef2
commit 3b434ca548
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@
ACLOCAL_AMFLAGS = -I m4
@CODE_COVERAGE_RULES@
CODE_COVERAGE_IGNORE_PATTERN="tests/*" "lex.yy.c" "y.tab.c" "asn1p_l.l" "asn1p_y.y"
SUBDIRS = \
libasn1parser libasn1fix \

View File

@ -54,7 +54,7 @@ cat > "$testdir/Makefile" <<EOM
# This file is autogenerated by ../$0
COMMON_FLAGS= -I.
CFLAGS = \${COMMON_FLAGS} ${CFLAGS:-} -g -O0
CFLAGS = \${COMMON_FLAGS} ${CFLAGS:-} -g -O0 -I ${abs_top_srcdir}/skeletons
CPPFLAGS = -DSRCDIR=../${srcdir}
CXXFLAGS = \${COMMON_FLAGS} ${CXXFLAGS}
@ -63,12 +63,12 @@ CC ?= ${CC}
all: check-executable
check-executable: compiled-module *.c*
@rm -f *.core
\$(CC) \$(CPPFLAGS) \$(CFLAGS) -o check-executable *.c* -lm
\$(CC) \$(CPPFLAGS) \$(CFLAGS) -o check-executable *.c* -L${abs_top_builddir}/skeletons/.libs -lasn1cskeletons -lm
# Compile the corresponding .asn1 spec.
compiled-module: ${asn_module} ${abs_top_builddir}/asn1c/asn1c
${abs_top_builddir}/asn1c/asn1c \\
-S ${abs_top_srcdir}/skeletons \\
-S /tmp/do/not/copy/skeletons \\
-Wdebug-compiler \\
${AFLAGS} ${asn_module}
rm -f converter-sample.c