summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/src/main.c
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-07-15 10:17:20 -0600
committerCommit Bot <commit-bot@chromium.org>2021-08-31 18:33:19 +0000
commited87c0c1ade57ab6e8bd46a11a2f0484a503f1b8 (patch)
treefc57a496d2c73b9dc4f5a5727c0e7771aa9dbf2f /zephyr/test/drivers/src/main.c
parent003ec08f8c67845ae8481d3fb4124555213b04c4 (diff)
downloadchrome-ec-ed87c0c1ade57ab6e8bd46a11a2f0484a503f1b8.tar.gz
zephyr: test: drivers: add eSPI test using host command
Verify that we can call host commands from driver tests by adding a test that calls the EC_CMD_GET_PROTOCOL_INFO host command. Add a few convenience functions to host_command.h when building with CONFIG_ZTEST enabled. Also, add eSPI emulator to support the test. Coverage: - lines 17.4% -> 17.8% - functions 21.4% -> 22.0% BRANCH=none BUG=b:189954415 TEST=zmake configure --test zephyr/test/drivers Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ib9e750eeab555ea629a560cbf3beed28e346c460 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3031842 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/test/drivers/src/main.c')
-rw-r--r--zephyr/test/drivers/src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zephyr/test/drivers/src/main.c b/zephyr/test/drivers/src/main.c
index ca573b98fd..46fd462283 100644
--- a/zephyr/test/drivers/src/main.c
+++ b/zephyr/test/drivers/src/main.c
@@ -18,6 +18,7 @@ extern void test_suite_ppc(void);
extern void test_suite_bmi260(void);
extern void test_suite_bmi160(void);
extern void test_suite_tcs3400(void);
+extern void test_suite_espi(void);
void test_main(void)
{
@@ -37,4 +38,5 @@ void test_main(void)
test_suite_bmi260();
test_suite_bmi160();
test_suite_tcs3400();
+ test_suite_espi();
}