Merge remote branch 'cros/upstream' into tempbranch2
Merged to trunk@4816.
BUG=
TEST=we will build a new autotest server instance, and keep cautotest running and then later do a cname switch.
Review URL: http://codereview.chromium.org/3511003
Change-Id: Iee5f52f45f28f84927d6c6f9a74edc370d40288a
diff --git a/server/hosts/serial.py b/server/hosts/serial.py
index 9b4bdb2..d514dba 100644
--- a/server/hosts/serial.py
+++ b/server/hosts/serial.py
@@ -114,7 +114,7 @@
def hardreset(self, timeout=DEFAULT_REBOOT_TIMEOUT, wait=True,
- conmux_command='hardreset', num_attempts=1,
+ conmux_command='hardreset', num_attempts=1, halt=False,
**wait_for_restart_kwargs):
"""
Reach out and slap the box in the power switch.
@@ -124,6 +124,7 @@
@params wait: Whether or not to wait for the machine to reboot
@params num_attempts: Number of times to attempt hard reset erroring
on the last attempt.
+ @params halt: Halts the machine before hardresetting.
@params **wait_for_restart_kwargs: keyword arguments passed to
wait_for_restart()
"""
@@ -138,6 +139,8 @@
old_boot_id = 'unknown boot_id prior to SerialHost.hardreset'
def reboot():
+ if halt:
+ self.halt()
if not self.run_conmux(conmux_command):
self.record("ABORT", None, "reboot.start",
"hard reset unavailable")