diff options
author | Aaron Massey <aaronmassey@google.com> | 2021-11-02 16:17:25 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-10 22:22:20 +0000 |
commit | 52f33fcf61835452f3c96d9861a199461a2da027 (patch) | |
tree | 8aefb6edd6c1e07606175bbae61d1c2222191788 | |
parent | 5b16d138e9bd2d01cef1f08f74c88923bb1770cf (diff) | |
download | chrome-ec-52f33fcf61835452f3c96d9861a199461a2da027.tar.gz |
zephyr: test: verify sn5s330 driver init
Now that the emulator functionality is supported, we should test sn5s330
driver initialization.
Modify existing unit test to verify driver initialization.
BRANCH=none
BUG=b:03364783
TEST=zmake configure --test zephyr/test/drivers
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: Ie96c8edbbefc59fde72ba0193aea73e7802506e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3258523
Reviewed-by: Yuval Peress <peress@google.com>
-rw-r--r-- | zephyr/test/drivers/src/ppc_sn5s330.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/zephyr/test/drivers/src/ppc_sn5s330.c b/zephyr/test/drivers/src/ppc_sn5s330.c index 8911f4000d..3cabfc43c9 100644 --- a/zephyr/test/drivers/src/ppc_sn5s330.c +++ b/zephyr/test/drivers/src/ppc_sn5s330.c @@ -43,11 +43,8 @@ static void test_fail_once_func_set1(void) uint32_t func_set1_value; i2c_common_emul_set_write_func(i2c_emul, fail_until_write_func, &count); - /* - * Call the init and ignore the return value, we're just checking that - * setting FUNC_SET1 retries at least once. - */ - sn5s330_drv.init(SN5S330_PORT); + + zassert_ok(sn5s330_drv.init(SN5S330_PORT), NULL); zassert_equal(count, 0, NULL); zassert_ok(sn5s330_emul_peek_reg(emul, SN5S330_FUNC_SET1, &func_set1_value), |