summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/default/src/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/test/drivers/default/src/system.c')
-rw-r--r--zephyr/test/drivers/default/src/system.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/zephyr/test/drivers/default/src/system.c b/zephyr/test/drivers/default/src/system.c
index e3d2aeb5ac..74b238ced2 100644
--- a/zephyr/test/drivers/default/src/system.c
+++ b/zephyr/test/drivers/default/src/system.c
@@ -27,4 +27,18 @@ ZTEST_USER(system, test_hostcmd_sysinfo)
zassert_equal(response.flags, 0, "response.flags = %d", response.flags);
}
+ZTEST_USER(system, test_hostcmd_board_version)
+{
+ struct ec_response_board_version response;
+ struct host_cmd_handler_args args = BUILD_HOST_COMMAND_RESPONSE(
+ EC_CMD_GET_BOARD_VERSION, 0, response);
+
+ /* Get the board version, which is default 0. */
+ zassert_ok(host_command_process(&args), NULL);
+ zassert_ok(args.result, NULL);
+ zassert_equal(args.response_size, sizeof(response), NULL);
+ zassert_equal(response.board_version, 0, "response.board_version = %d",
+ response.board_version);
+}
+
ZTEST_SUITE(system, drivers_predicate_post_main, NULL, NULL, NULL, NULL);