Home | History | Annotate | Download | only in deployment
      1 #!/usr/bin/env python
      2 # Copyright 2015 The Chromium OS Authors. All rights reserved.
      3 # Use of this source code is governed by a BSD-style license that can be
      4 # found in the LICENSE file.
      5 
      6 """Force a DUT through the standard servo repair cycle.
      7 
      8 This command is meant primarily for use in the following use case:
      9   * A DUT with servo attached has failed repair.
     10   * The servo has been fixed, and we now want to confirm the
     11     fix by using servo to repair the DUT.
     12 
     13 The command will force selected DUTs through the standard servo
     14 repair cycle, reinstalling the stable test image on the DUTs
     15 from USB.
     16 
     17 """
     18 
     19 import sys
     20 
     21 import common
     22 from autotest_lib.site_utils.deployment import install
     23 
     24 
     25 def main(argv):
     26     """Standard main routine.
     27 
     28     @param argv  Command line arguments including `sys.argv[0]`.
     29     """
     30     install.install_duts(argv, full_deploy=False)
     31 
     32 
     33 if __name__ == '__main__':
     34     try:
     35         main(sys.argv)
     36     except KeyboardInterrupt:
     37         pass
     38     except EnvironmentError as e:
     39         sys.stderr.write('Unexpected OS error:\n    %s\n' % e)
     40     except Exception as e:
     41         sys.stderr.write('Unexpected exception:\n    %s\n' % e)
     42