mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +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:
@@ -79,6 +79,8 @@ static struct _if_value
|
||||
short else_branch;
|
||||
} stacked_if_value[MAX_NESTED_IF];
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
|
||||
%}
|
||||
|
||||
%option 8bit
|
||||
@@ -1249,7 +1251,11 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
|
||||
}
|
||||
}
|
||||
<INITIAL>{other}|\n { mmfatal(PARSE_ERROR, "internal error: unreachable state; please report this to <pgsql-bugs@postgresql.org>"); }
|
||||
|
||||
%%
|
||||
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
||||
void
|
||||
lex_init(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user