summaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorPeter Eisentraut2017-08-11 03:33:47 +0000
committerPeter Eisentraut2017-10-16 20:28:11 +0000
commit421167362242ce1fb46d6d720798787e7cd65aad (patch)
tree5f0c2620cd7364cd66404ca8a3433bb55d1291b3 /src/interfaces
parentcf5ba7c30c0428f5ff49197ec1e0f052035300d6 (diff)
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/interfaces')
-rw-r--r--src/interfaces/ecpg/preproc/pgc.l6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index fc450f30ab4..e35843ba4ed 100644
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -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)
{