diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-08-10 23:33:47 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-10-16 16:28:11 -0400 |
commit | 421167362242ce1fb46d6d720798787e7cd65aad (patch) | |
tree | 5f0c2620cd7364cd66404ca8a3433bb55d1291b3 /src/backend/parser | |
parent | cf5ba7c30c0428f5ff49197ec1e0f052035300d6 (diff) | |
download | postgresql-421167362242ce1fb46d6d720798787e7cd65aad.tar.gz postgresql-421167362242ce1fb46d6d720798787e7cd65aad.zip |
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>
Diffstat (limited to 'src/backend/parser')
-rw-r--r-- | src/backend/parser/scan.l | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l index 634bfa512f4..6af2199cdc5 100644 --- a/src/backend/parser/scan.l +++ b/src/backend/parser/scan.l @@ -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 |