blob: 582b3898ab86fab6cdb7beccb426705766159d9b [file] [log] [blame]
# Copyright (c) 2012 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 = "Chromium OS"
NAME = "Auto Update Host"
TIME = "MEDIUM"
TEST_CATEGORY = "Functional"
TEST_CLASS = "platform"
TEST_TYPE = "server"
DOC = """
A test that reimages the assigned machines and checks for success.
Can only be used by test suites based on server.cros.dynamic_suite.Suite.
Assumes that a label including the image name has already been created.
@param image_url: the full URL in which to find the update payload.
@param image_name: the name of the image, used to label the device a.k.a. build
"""
from autotest_lib.client.cros import constants
from autotest_lib.server.cros.dynamic_suite import frontend_wrappers
def run(machine):
# Save preserved log after autoupdate is completed.
job.sysinfo.add_logdir(constants.AUTOUPDATE_PRESERVE_LOG)
host = hosts.create_host(machine, initialize=False)
host.clear_cros_version_labels_and_job_repo_url()
job.run_test('autoupdate', host=host, update_url=image_url)
job.parallel_simple(run, machines)