blob: 41eea67fe4e7213533553f4bb2e9178c574e190e [file] [log] [blame]
# Copyright (c) 2010 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 = """
This is an end-to-end to for autoupdate.
Here is what it does:
1. Override the client lsb-release to point to the test server
2. Unzips an image, build update payload
3. Starts devserver with payload
4. Starts update process on client
5. Poll client for update completion
6. Reboot client and verify new release version in /etc/lsb-release
"""
from autotest_lib.client.common_lib import error
# Convert autoserv args to something usable.
opts = dict([[k, v] for (k, e, v) in [x.partition('=') for x in args]])
def run_it(machine):
try:
image_path = opts['image']
except KeyError:
raise error.TestFail('No --image specified')
# Setup the client machine.
host = hosts.create_host(machine)
job.run_test("autoupdate_Host", host=host, image_path=image_path)
parallel_simple(run_it, machines)