faft: Added USB PD device classes
Added PDDevice, PDConsoleDevice, PDPlanktonDevice classes. In addition,
added PDPortPartner class and USB Try.SRC protocol test which uses
the new methods. This is meant to be the first step in refactoring of
the USB PD suite of tests. These methods absorb common USB PD actions,
resulting in more reuse and shorter/easier to follow USB PD test scripts.
BRANCH=none
BUG=chrome-os-partner:50431
TEST=Manual
Tested with Samus and Plankton using the Try.SRC script.
Change-Id: I9c42e2da01f741e31daab40320117fa31970e5ff
Signed-off-by: Scott <scollyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/328836
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
diff --git a/server/cros/servo/pd_console.py b/server/cros/servo/pd_console.py
index 0a0aeca..02cea19 100644
--- a/server/cros/servo/pd_console.py
+++ b/server/cros/servo/pd_console.py
@@ -138,7 +138,7 @@
pd_cmd = cmd +" " + str(port) + " " + subcmd
# Two FW versions for this command, get full line.
m = self.send_pd_command_get_output(pd_cmd,
- ['(Port.*) - (Role:.*)\r'])
+ ['(Port.*) - (Role:.*)\n'])
# Extract desired values from result string
state_result = {}