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 """Install an initial test image on a set of new DUTs.
      7 
      8 This command is meant for deploying newly installed DUTs after
      9 completing these steps:
     10   * Removing the write-protect screw.
     11   * Switching the DUT to dev mode.
     12   * Configuring the DUT to allow dev-mode boot from USB.
     13   * Installing the DUT on its shelf, fully cabled and ready to go.
     14 
     15 The command will use servo to install dev-signed RO firmware on the
     16 selected DUTs.  Then it forces the DUTs through the standard repair
     17 flow, as in `repair.py`.
     18 
     19 """
     20 
     21 import sys
     22 
     23 import common
     24 from autotest_lib.site_utils.deployment import install
     25 
     26 
     27 def main(argv):
     28     """Standard main routine.
     29 
     30     @param argv  Command line arguments including `sys.argv[0]`.
     31     """
     32     install.install_duts(argv, full_deploy=True)
     33 
     34 
     35 if __name__ == '__main__':
     36     try:
     37         main(sys.argv)
     38     except KeyboardInterrupt:
     39         pass
     40     except EnvironmentError as e:
     41         sys.stderr.write('Unexpected OS error:\n    %s\n' % e)
     42     except Exception as e:
     43         sys.stderr.write('Unexpected exception:\n    %s\n' % e)
     44