Home | History | Annotate | Download | only in provision_AndroidUpdate
      1 # Copyright 2016 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 
      6 AUTHOR = "sbasi"
      7 NAME = "provision_AndroidUpdate"
      8 PURPOSE = "Provision an android-based system to the correct OS version."
      9 TIME = "MEDIUM"
     10 TEST_CATEGORY = "System"
     11 TEST_CLASS = "provision"
     12 TEST_TYPE = "Server"
     13 
     14 DOC = """
     15 This is a test used by the provision control segment in autoserv to set the
     16 ab-version label of a host to the desired setting and reimage the host to a
     17 specific version.
     18 """
     19 
     20 
     21 from autotest_lib.client.common_lib import error, utils
     22 from autotest_lib.client.cros import constants
     23 
     24 
     25 # Autoserv may inject a local variable called value to supply the desired
     26 # version. If it does not exist, check if it was supplied as a test arg.
     27 if not locals().get('value'):
     28     args = utils.args_to_dict(args)
     29     if not args.get('value'):
     30         raise error.TestError("No provision value!")
     31     value = args['value']
     32 
     33 
     34 def run(machine):
     35     host = hosts.create_host(machine)
     36     job.run_test('provision_AndroidUpdate', host=host, value=value)
     37 
     38 
     39 job.parallel_simple(run, machines)
     40