Autotest: Moved USB Management of Install Recovery Image to Servod
Moved the code segments involving USB detection and image downloading from
autoserve to servo_server.
Now if autoserv is given an image_path, servo_server will probe for the servo
USB device and transfer the image either from the local path or a publically
visible URL.
Removed the arg usb_dev and all references to this argument as it is no longer
required.
Added an argument called make_image_noninteractive so that the DUT will reboot
automatically after a recovery image installation.
Updated all callers and the test control files.
CQ-DEPEND=I2a5c6b54b8abcb5fc99e5c04ba9659dc4dacca8b
BUG=chrome-os-partner:8754
TEST=Ran locally with a local image, a image hosted in my www folder,
and without a USB device connected to servo.
Change-Id: Ib32e449497d82cde97203124441a1946ca7ca606
Reviewed-on: https://gerrit.chromium.org/gerrit/23049
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Simran Basi <sbasi@google.com>
Tested-by: Simran Basi <sbasi@google.com>
diff --git a/server/cros/faftsequence.py b/server/cros/faftsequence.py
index b4ae003..f7eddeb 100644
--- a/server/cros/faftsequence.py
+++ b/server/cros/faftsequence.py
@@ -276,8 +276,7 @@
'The image in the USB disk should be a test image.')
- def install_test_image(self, image_path=None, firmware_update=False,
- usb_dev=None):
+ def install_test_image(self, image_path=None, firmware_update=False):
"""Install the test image specied by the path onto the USB and DUT disk.
The method first copies the image to USB disk and reboots into it via
@@ -286,9 +285,6 @@
Args:
image_path: Path on the host to the test image.
firmware_update: Also update the firmware after installing.
- usb_dev: When servo_sees_usbkey is enabled, which dev
- e.g. /dev/sdb will the usb key show up as.
- If None, detects it automatically.
"""
install_cmd = 'chromeos-install --yes'
if firmware_update:
@@ -296,13 +292,10 @@
build_ver, build_hash = lab_test.VerifyImageAndGetId(cros_dir,
image_path)
logging.info('Processing build: %s %s' % (build_ver, build_hash))
- if not usb_dev:
- usb_dev = self.servo.probe_host_usb_dev()
# Reuse the install_recovery_image method by using a test image.
# Don't wait for completion but run chromeos-install to install it.
- self.servo.install_recovery_image(image_path, usb_dev,
- wait_for_completion=False)
+ self.servo.install_recovery_image(image_path)
self.wait_for_client(install_deps=True)
self.run_faft_step({
'userspace_action': (self.faft_client.run_shell_command,