summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTristan Honscheid <honscheid@google.com>2022-09-20 10:54:31 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-23 22:16:16 +0000
commitb9caf4a588579e1d8e623a27db2862cf65a319ff (patch)
treea8210baa833e2e872c338387a81515bc4266fd45 /common
parent9bfa3fbf1065c8a65acf3e33e28d6e61063d0de5 (diff)
downloadchrome-ec-b9caf4a588579e1d8e623a27db2862cf65a319ff.tar.gz
zephyr: tests: Test timer_init() in common/timer.c
Test the timer initialization function. Add some mocks for the board-level functions and the jump tag API. BRANCH=None BUG=b:247608485 TEST=./twister Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I7edeca26e93f18c467618691967299f411507166 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3910977 Reviewed-by: Tomasz Michalec <tmichalec@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'common')
-rw-r--r--common/system.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/system.c b/common/system.c
index b4387f5257..8302ae8885 100644
--- a/common/system.c
+++ b/common/system.c
@@ -369,7 +369,8 @@ int system_add_jump_tag(uint16_t tag, int version, int size, const void *data)
return EC_SUCCESS;
}
-const uint8_t *system_get_jump_tag(uint16_t tag, int *version, int *size)
+test_mockable const uint8_t *system_get_jump_tag(uint16_t tag, int *version,
+ int *size)
{
const struct jump_tag *t;
int used = 0;