faft: Force to use cold_reset if warm_reset is broken on some devices
On some devices, the warm_reset is broken since this line is not connected.
It makes failures on almost all FAFT tests. So force to use cold_reset
instead.
BUG=chrome-os-partner:11826,chrome-os-partner:11827
TEST=Run firmware_TryFwB/control.dev on Parrot passed.
Change-Id: I8be3b0226748b803f01eb89bbd229433f5dfcdf6
Reviewed-on: https://gerrit.chromium.org/gerrit/28788
Reviewed-by: Vic Yang <victoryang@chromium.org>
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/faftsequence.py b/server/cros/faftsequence.py
index ae37897..28d3d6d 100644
--- a/server/cros/faftsequence.py
+++ b/server/cros/faftsequence.py
@@ -876,9 +876,13 @@
def warm_reboot(self):
"""Request a warm reboot.
- This directly calls the servo warm reset.
+ A wrapper for underlying servo warm reset.
"""
- self.servo.warm_reset()
+ # Use cold reset if the warm reset is broken.
+ if self.client_attr.broken_warm_reset:
+ self.servo.cold_reset()
+ else:
+ self.servo.warm_reset()
def cold_reboot(self):