summaryrefslogtreecommitdiff
path: root/src/bin/psql/psqlscanslash.l
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-08-10 23:33:47 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-10-16 16:28:11 -0400
commit421167362242ce1fb46d6d720798787e7cd65aad (patch)
tree5f0c2620cd7364cd66404ca8a3433bb55d1291b3 /src/bin/psql/psqlscanslash.l
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/bin/psql/psqlscanslash.l')
-rw-r--r--src/bin/psql/psqlscanslash.l4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/psql/psqlscanslash.l b/src/bin/psql/psqlscanslash.l
index 9a53cb3e02b..e3cde04188a 100644
--- a/src/bin/psql/psqlscanslash.l
+++ b/src/bin/psql/psqlscanslash.l
@@ -67,6 +67,8 @@ static void evaluate_backtick(PsqlScanState state);
extern int slash_yyget_column(yyscan_t yyscanner);
extern void slash_yyset_column(int column_no, yyscan_t yyscanner);
+/* LCOV_EXCL_START */
+
%}
/* Except for the prefix, these options should match psqlscan.l */
@@ -468,6 +470,8 @@ other .
%%
+/* LCOV_EXCL_STOP */
+
/*
* Scan the command name of a psql backslash command. This should be called
* after psql_scan() returns PSCAN_BACKSLASH. It is assumed that the input