blob: 68fefb02179972dd4d8b8d4c17685289f7097ab1 [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. Starts devserver with specified payload
3. Starts update process on client
4. Poll client for update completion
5. Reboot client and repeat from step 1
"""
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):
start = get_key('start_image')
target = get_key('target_image')
iteration = get_key('iteration')
# Setup the client machine.
host = hosts.create_host(machine)
job.run_test("autoupdate_Loop", host=host, start=start,
target=target, iteration=iteration)
def get_key(key):
try:
return opts[key]
except KeyError:
raise error.TestFail('Could not find flag: %s' % key)
parallel_simple(run_it, machines)