diff options
author | Yuval Peress <peress@chromium.org> | 2021-07-15 10:17:20 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-31 18:33:19 +0000 |
commit | ed87c0c1ade57ab6e8bd46a11a2f0484a503f1b8 (patch) | |
tree | fc57a496d2c73b9dc4f5a5727c0e7771aa9dbf2f /zephyr/shim/src/ztest_system.c | |
parent | 003ec08f8c67845ae8481d3fb4124555213b04c4 (diff) | |
download | chrome-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/shim/src/ztest_system.c')
-rw-r--r-- | zephyr/shim/src/ztest_system.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zephyr/shim/src/ztest_system.c b/zephyr/shim/src/ztest_system.c index 4b30270692..14796b5bd5 100644 --- a/zephyr/shim/src/ztest_system.c +++ b/zephyr/shim/src/ztest_system.c @@ -61,3 +61,9 @@ struct jump_data *get_jump_data(void) { return NULL; } + +__attribute__((weak)) +void system_reset(int flags) +{ + __builtin_unreachable(); +} |