summaryrefslogtreecommitdiff
path: root/common/system.c
diff options
context:
space:
mode:
authorFabio Baltieri <fabiobaltieri@google.com>2022-08-18 12:37:39 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-22 19:00:42 +0000
commit4c716941b0ab86a1c91b19c62cb5c3c55ba89fe0 (patch)
tree5066e28c087f1eeac11542699365a62e5fbaa0e1 /common/system.c
parent28bd2f73640d7d055e58cc505e6544ecc8fb0bfc (diff)
downloadchrome-ec-4c716941b0ab86a1c91b19c62cb5c3c55ba89fe0.tar.gz
zephyr: test: add tests for reboot host command
Test various combinations of the EC_CMD_REBOOT_EC host command. This is only missing EC_REBOOT_JUMP_RO and EC_REBOOT_JUMP_RW, which needs more work, to be made testable, but this seems like a good point to cut a commit. BRANCH=none BUG=b:236074981 TEST=./twister -v -T zephyr/test/system_common Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ie2b53a0799bb64322646728608d3c3bfd6d3fce4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3838932 Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'common/system.c')
-rw-r--r--common/system.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/system.c b/common/system.c
index 1961f192e5..6b91767065 100644
--- a/common/system.c
+++ b/common/system.c
@@ -1828,3 +1828,12 @@ __test_only void system_common_reset_state(void)
reset_flags = 0;
jumped_to_image = 0;
}
+
+__test_only enum ec_reboot_cmd system_common_get_reset_reboot_at_shutdown(void)
+{
+ int ret = reboot_at_shutdown;
+
+ reboot_at_shutdown = 0;
+
+ return ret;
+}