summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/src/isl923x.c
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-02-09 18:21:00 -0700
committerCommit Bot <commit-bot@chromium.org>2022-02-15 16:18:25 +0000
commit62116801c695db22ab79ce7df98c34248d6f1fc1 (patch)
treea28b1ba8ab70662284733bcfa856468e93c2244b /zephyr/test/drivers/src/isl923x.c
parent112bc3616b55421af4ae5003c542e9a425128650 (diff)
downloadchrome-ec-62116801c695db22ab79ce7df98c34248d6f1fc1.tar.gz
zephyr: Include common/system.c in posix also
Change arch posix to also include common/system.c This required removing some mocked functions from ztest_system.c, adding others, and making some of them test_mockable for tests that already provided them. There was one test scenario that had to be removed, as it's not clear how to simulate late jump to rw with the real system.c code. Added a TODO to come back and fix that test. BRANCH=None BUG=b:214256453,b:219520539 TEST=zmake testall Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I59be918f95b3e1048c87b6cd504ae48627fd84c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3451273 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/test/drivers/src/isl923x.c')
-rw-r--r--zephyr/test/drivers/src/isl923x.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/zephyr/test/drivers/src/isl923x.c b/zephyr/test/drivers/src/isl923x.c
index c2e0f00c76..05737a9af0 100644
--- a/zephyr/test/drivers/src/isl923x.c
+++ b/zephyr/test/drivers/src/isl923x.c
@@ -668,18 +668,10 @@ ZTEST(isl923x, test_init)
"Expected input current 0mV but got %dmV", input_current);
/*
- * Test system_jumped_late being true (will not call
- * set_input_current_limit)
+ * TODO(b/219520539): Test system_jumped_late being true (will not call
+ * set_input_current_limit). It isn't clear how to stimulate the
+ * code in system.c to cause a late jump.
*/
- system_jumped_late_mock.ret_val = true;
- system_jumped_late_mock.call_count = 0;
- isl923x_emul_reset(isl923x_emul);
- isl923x_drv.init(CHARGER_NUM);
- zassert_equal(
- 1, system_jumped_late_mock.call_count,
- "Expected to have called system_jumped_late() once, but got %d calls",
- system_jumped_late_mock.call_count);
- system_jumped_late_mock.ret_val = false;
}
ZTEST(isl923x, test_isl923x_is_acok)