1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Exclude flex-generated code from coverage testing

Flex generates a lot of functions that are not actually used.  In order
to avoid coverage figures being ruined by that, mark up the part of the
.l files where the generated code appears by lcov exclusion markers.
That way, lcov will typically only reported on coverage for the .l file,
which is under our control, but not for the .c file.

Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
This commit is contained in:
Peter Eisentraut
2017-08-10 23:33:47 -04:00
parent cf5ba7c30c
commit 4211673622
12 changed files with 47 additions and 1 deletions

View File

@ -38,6 +38,7 @@
/* Not needed now that this file is compiled as part of bootparse. */
/* #include "bootparse.h" */
/* LCOV_EXCL_START */
/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
#undef fprintf
@ -134,6 +135,8 @@ insert { return INSERT_TUPLE; }
%%
/* LCOV_EXCL_STOP */
void
yyerror(const char *message)
{