diff options
author | Jeremy Bettis <jbettis@google.com> | 2021-04-09 10:21:39 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-12 17:54:21 +0000 |
commit | bd2b1eb38349dcc736c5ec6763abdeb87e48aa16 (patch) | |
tree | c1c939743baaa263171c4d5b524f1e4886e5b5ba /zephyr/shim | |
parent | f334d6f9d4116eeb4999293108abf8fe147d6f83 (diff) | |
download | chrome-ec-bd2b1eb38349dcc736c5ec6763abdeb87e48aa16.tar.gz |
zephyr: Shell of driver ztest.
Create a shell of a test that can have many test suites for device
drivers. Currently this test only checks that the EC_BATT_PRES_ODL can
be read correctly by battery_is_present(). But it links in many device
drivers and is a starting point for the next test.
BUG=b:185118990
TEST=It is one
BRANCH=none
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I07c8835015cbe0fec6aaf82f782400e894043a90
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2819029
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r-- | zephyr/shim/include/board.h | 2 | ||||
-rw-r--r-- | zephyr/shim/src/ztest_system.c | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/zephyr/shim/include/board.h b/zephyr/shim/include/board.h index 3c12788663..df3ef33c0e 100644 --- a/zephyr/shim/include/board.h +++ b/zephyr/shim/include/board.h @@ -17,7 +17,7 @@ #endif /* Include board specific i2c mapping if I2C is enabled. */ -#if defined(CONFIG_I2C) && !defined(CONFIG_ZTEST) +#if defined(CONFIG_I2C) #include "i2c/i2c.h" #endif diff --git a/zephyr/shim/src/ztest_system.c b/zephyr/shim/src/ztest_system.c index 10422ac719..625502ed82 100644 --- a/zephyr/shim/src/ztest_system.c +++ b/zephyr/shim/src/ztest_system.c @@ -21,3 +21,28 @@ const uint8_t *system_get_jump_tag(uint16_t tag, int *version, int *size) { return NULL; } + +int system_jumped_late(void) +{ + return 0; +} + +enum ec_image system_get_image_copy(void) +{ + return EC_IMAGE_RW; +} + +int system_is_locked(void) +{ + return 0; +} + +int system_is_in_rw(void) +{ + return 1; +} + +uint32_t system_get_reset_flags(void) +{ + return 0; +} |