blob: 8ab4095b509e7594dae808e44bd3cf32a0721bd2 [file] [log] [blame]
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
AUTHOR = "sbasi"
NAME = "provision_AndroidUpdate"
PURPOSE = "Provision an android-based system to the correct OS version."
TEST_CLASS = "provision"
TEST_TYPE = "Server"
DOC = """
This is a test used by the provision control segment in autoserv to set the
ab-version label of a host to the desired setting and reimage the host to a
specific version.
from autotest_lib.client.common_lib import error, utils
from autotest_lib.client.cros import constants
# Autoserv may inject a local variable called value to supply the desired
# version. If it does not exist, check if it was supplied as a test arg.
if not locals().get('value'):
args = utils.args_to_dict(args)
if not args.get('value'):
raise error.TestError("No provision value!")
value = args['value']
def run(machine):
host = hosts.create_host(machine)
job.run_test('provision_AndroidUpdate', host=host, value=value)
job.parallel_simple(run, machines)