diff options
author | Tristan Honscheid <honscheid@google.com> | 2022-05-12 11:34:05 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-13 16:50:53 +0000 |
commit | e78965aebeb594b44151c7b41f1151d5313bdb6e (patch) | |
tree | a475289f16cfb6fba3e04ff9bc3f347416defb5b /zephyr/test | |
parent | 94a506c16a059c4e358c9ccd249df98fd5eeab3c (diff) | |
download | chrome-ec-e78965aebeb594b44151c7b41f1151d5313bdb6e.tar.gz |
tests: Set TCPCI revision in suite usb_attach_5v_3a_pd_source
The test suite usb_attach_5v_3a_pd_source contains two flaky tests
(test_power_info and test_typec_status) that fail when the suite is run
in isolation or out-of-order.
Abe noticed that the test doesn't set the TCPCI revision, which we need
to be higher than the default of 1.0. These tests were previously
relying on other test suites to make this update.
This change sets the TCPCI version in the board config and emulator
(both are required and must agree) in the suite's setup function. It
may be required in other suites as well, but those will get handled on
a case-by-case basis as test shuffling reveals more flaky tests.
BRANCH=None
BUG=b:232431388
TEST=zmake test test-drivers
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Change-Id: I55f1ad46c3dfb370f43a6f80cd93913a95335f9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3646049
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'zephyr/test')
-rw-r--r-- | zephyr/test/drivers/src/integration/usbc/usb_5v_3a_pd_source.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zephyr/test/drivers/src/integration/usbc/usb_5v_3a_pd_source.c b/zephyr/test/drivers/src/integration/usbc/usb_5v_3a_pd_source.c index f0132dc0a0..aed498129f 100644 --- a/zephyr/test/drivers/src/integration/usbc/usb_5v_3a_pd_source.c +++ b/zephyr/test/drivers/src/integration/usbc/usb_5v_3a_pd_source.c @@ -30,6 +30,11 @@ static void *usb_attach_5v_3a_pd_source_setup(void) emul_get_binding(DT_LABEL(DT_NODELABEL(tcpci_emul))); test_fixture.charger_emul = emul_get_binding(DT_LABEL(DT_NODELABEL(isl923x_emul))); + + /* Configure TCPCI revision in board config and emulator */ + tcpc_config[0].flags |= TCPC_FLAGS_TCPCI_REV2_0; + tcpci_emul_set_rev(test_fixture.tcpci_emul, TCPCI_EMUL_REV2_0_VER1_1); + return &test_fixture; } |