summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorYuval Peress <peress@google.com>2022-04-04 11:39:49 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-04 19:56:24 +0000
commit8a77a7547b2156f0822a85b91cd933797adec939 (patch)
treeae0981b5c58ebc4c2c3496b0ffba0e7174b7b657 /common
parentff8b5f8f756a924c1ced5b400ce3447a59e7418f (diff)
downloadchrome-ec-8a77a7547b2156f0822a85b91cd933797adec939.tar.gz
zephyr: test: filter unreachable tests from lcov
The tests for this file are currently removed in test/build.mk but the coverage still includes these lines as uncovered. Filter them out at the lcov level so they reflect the same decision. BRANCH=none BUG=none TEST=none Signed-off-by: Yuval Peress <peress@google.com> Change-Id: Id0e94a9361a75470f9f52c1e9ce993f32431e5d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3570161 Reviewed-by: Sam Hurst <shurst@google.com> Commit-Queue: Sam Hurst <shurst@google.com>
Diffstat (limited to 'common')
-rw-r--r--common/version.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/version.c b/common/version.c
index 68ec632701..fcef312484 100644
--- a/common/version.c
+++ b/common/version.c
@@ -40,6 +40,7 @@ const char build_info[] __keep __attribute__((section(".rodata.buildinfo"))) =
VERSION " " DATE " " BUILDER;
#endif
+/* LCOV_EXCL_LINE - this function doesn't work in GitLab */
static int get_num_commits(const struct image_data *data)
{
int numperiods = 0;
@@ -70,7 +71,9 @@ static int get_num_commits(const struct image_data *data)
return (i == sizeof(data->version) ? 0 : ret);
}
+/* LCOV_EXCL_STOP */
+/* LCOV_EXCL_LINE - this function doesn't work in GitLab */
int ver_get_num_commits(enum ec_image copy)
{
const struct image_data *data;
@@ -80,3 +83,4 @@ int ver_get_num_commits(enum ec_image copy)
data = &current_image_data;
return data ? get_num_commits(data) : 0;
}
+/* LCOV_EXCL_STOP */