1# Copyright 2018 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5 6from autotest_lib.server import test 7from autotest_lib.server.hosts import repair_utils 8 9 10class servo_USBInstall(test.test): 11 """Force install cros to a dut from servo""" 12 version = 1 13 14 def run_once(self, host): 15 """ 16 Force install image from servo to a dut via USB 17 18 @param host Host object representing DUT to be re-imaged. 19 """ 20 repair_utils.require_servo(host) 21 _, update_url = host.stage_image_for_servo() 22 host.servo_install(update_url) 23