diff options
author | Diana Z <dzigterman@chromium.org> | 2022-10-12 15:56:20 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-17 22:00:09 +0000 |
commit | c081674ce5637d709ad6e8f77c060bab94ec992e (patch) | |
tree | 54066cc5c63549b4c8ebf6704d8ac3a85e7d98b3 | |
parent | 793486898dd29e1ec01340654d8b0cfa1fec43cf (diff) | |
download | chrome-ec-c081674ce5637d709ad6e8f77c060bab94ec992e.tar.gz |
Zephyr test: Add verification of AP mux control flag
Add code to verify our AP mux control flag is being set when this
feature is enabled.
BRANCH=None
BUG=None
TEST=./twister -T ./zephyr/test
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I2c4dcd791c4150e02a4a1985af641ddf3b1ab8ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3953481
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r-- | zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c b/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c index 49c695b830..d059870f25 100644 --- a/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c +++ b/zephyr/test/drivers/ap_mux_control/src/ap_mux_control.c @@ -40,6 +40,15 @@ static void ap_mux_control_after(void *data) ZTEST_SUITE(ap_mux_control, drivers_predicate_post_main, NULL, ap_mux_control_before, ap_mux_control_after, NULL); +ZTEST(ap_mux_control, test_feature_present) +{ + struct ec_response_get_features feat = host_cmd_get_features(); + + zassert_true(feat.flags[1] & + EC_FEATURE_MASK_1(EC_FEATURE_TYPEC_AP_MUX_SET), + "Failed to see feature present"); +} + ZTEST(ap_mux_control, test_set_muxes) { struct ec_response_typec_status status; |