blob: 3f1a4b7d4011c2325a886b8576797da61555c8bb [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 = "autoupdate_Host.local"
TEST_CATEGORY = "Functional"
TEST_CLASS = "platform"
TEST_TYPE = "server"
DOC = """
A test that reimages the assigned machines and checks for success.
Performs an update using the local devserver and flexes the autoupdater
pathways. This test presumes that you have already started up a local devserver.
You can do this by running:
start_devserver [--pregenerate_update] [--image|--payload=<optional target>].
@param port: Optional port to use to connect to the devsever. By default this is
import socket
from autotest_lib.client.common_lib import utils
def run(machine):
hostname = socket.getfqdn()
args_dict = utils.args_to_dict(args)
port = args_dict.get('port', '8080')
image_url = 'http://%s:%s/update' % (hostname, port)
host = hosts.create_host(machine, initialize=False)
job.run_test('autoupdate', host=host, update_url=image_url,
job.parallel_simple(run, machines)