summaryrefslogtreecommitdiff
path: root/test/usb_pe_drp.c
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-07-13 16:52:11 -0600
committerCommit Bot <commit-bot@chromium.org>2021-07-27 16:19:04 +0000
commit7d827bd265bce19064198ea5866b5db16f3307d6 (patch)
tree9c3d946973adfc6cb8fcc1728191ef9564f2ea2a /test/usb_pe_drp.c
parent26a7501ac9ad05c920ec37f3cb55212f55fa0a9d (diff)
downloadchrome-ec-7d827bd265bce19064198ea5866b5db16f3307d6.tar.gz
TCPMv2: Allow tests to clear PE data between runs
The PE stores internal state (ex. capabilities, identity responses) which should be cleared out between unit test runs. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I77b3faefd3f887a68ca9593a7398ae9c3ffb2f17 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3025864 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'test/usb_pe_drp.c')
-rw-r--r--test/usb_pe_drp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/usb_pe_drp.c b/test/usb_pe_drp.c
index 086e2263a5..85f2bb7358 100644
--- a/test/usb_pe_drp.c
+++ b/test/usb_pe_drp.c
@@ -42,6 +42,7 @@ void before_test(void)
mock_dpm_reset();
mock_dp_alt_mode_reset();
mock_prl_reset();
+ pe_clear_port_data(PORT0);
/* Restart the PD task and let it settle */
task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE);