mirror of
https://github.com/postgres/postgres.git
synced 2025-10-28 11:55:03 +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:
@@ -41,6 +41,9 @@
|
||||
}
|
||||
|
||||
%{
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
|
||||
/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
|
||||
#undef fprintf
|
||||
#define fprintf(file, fmt, msg) fprintf_to_ereport(fmt, msg)
|
||||
@@ -1011,6 +1014,8 @@ other .
|
||||
|
||||
%%
|
||||
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
||||
/*
|
||||
* Arrange access to yyextra for subroutines of the main yylex() function.
|
||||
* We expect each subroutine to have a yyscanner parameter. Rather than
|
||||
|
||||
Reference in New Issue
Block a user