aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhuohao Lee <zhuohao@chromium.org>2022-05-13 13:33:22 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-17 10:21:47 +0000
commit52589cac26cd47124e6b794362e8cecbd08faeb1 (patch)
tree6904d8e0d2e8e85878f92b055ca40d4765963e7f
parent3223b0795fd38a54613ff33da5fddee3cf0b8d02 (diff)
downloadautotest-52589cac26cd47124e6b794362e8cecbd08faeb1.tar.gz
firmware_PDProtocol: add a chromebox/chromebase check for the PD
For the current EC implementation, we allow the recovery mode of the chromebox/chromebase using the USBC PD. To avoid the test failed, we add a check for the chromebox/chromebase form-factor. BUG=b:232482512, b:209707579 TEST=test_that -b brask ${IP_ADDR} firmware_PDProtocol Change-Id: If3971e4affba8776c0c90cdfeaf89a74b8116633 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/3644932 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: ChiJen Chen <chi-jen.chen@quanta.corp-partner.google.com> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
-rw-r--r--server/site_tests/firmware_PDProtocol/firmware_PDProtocol.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/site_tests/firmware_PDProtocol/firmware_PDProtocol.py b/server/site_tests/firmware_PDProtocol/firmware_PDProtocol.py
index 56c816d38a..f6d8323183 100644
--- a/server/site_tests/firmware_PDProtocol/firmware_PDProtocol.py
+++ b/server/site_tests/firmware_PDProtocol/firmware_PDProtocol.py
@@ -116,7 +116,7 @@ class firmware_PDProtocol(FirmwareTest):
return False
- def run_once(self):
+ def run_once(self, host):
"""Main test logic"""
# TODO(b/35573842): Refactor to use PDPortPartner to probe the port
self.pdtester_port = 1 if 'servo_v4' in self.pdtester.servo_type else 0
@@ -136,8 +136,12 @@ class firmware_PDProtocol(FirmwareTest):
self.boot_to_recovery()
# Check PD is not negotiated
- if (not
- self.pdtester_pd_utils.is_snk_discovery_state(self.pdtester_port)):
+ # We allow the chromebox/chromebase, to enable the PD in the
+ # recovery mode.
+ if (host.get_board_type() != 'CHROMEBOX'
+ and host.get_board_type() != 'CHROMEBASE'
+ and not self.pdtester_pd_utils.is_snk_discovery_state(
+ self.pdtester_port)):
raise error.TestFail('Expect PD to be disabled, WP (HW/SW) %s/%s' %
(self.hw_wp, self.sw_wp))