1# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5AUTHOR = "Chrome OS Team"
6NAME = "au"
7PURPOSE = "Automated testing of autoupdate done by continuous builders."
8
9TIME = "MEDIUM"
10TEST_CATEGORY = "General"
11TEST_CLASS = "suite"
12TEST_TYPE = "Server"
13
14DOC = """
15This is the equivalent of the build verification suite but for autoupdate in the
16sense that this suite contains the Autoupdate Verification tests that must pass
17with every build.
18
19Note: the control files used by this suite are auto-generated by Chromium OS
20builds which use the template control file from
21server/site_tests/autoupdate_EndToEndTest/control.
22
23@param build: The name of the image to test.
24              Ex: x86-mario-release/R17-1412.33.0-a1-b29
25@param board: The board to test on. Ex: x86-mario
26@param pool: The pool of machines to utilize for scheduling. If pool=None
27             board is used.
28@param check_hosts: require appropriate live hosts to exist in the lab.
29"""
30
31import common
32from autotest_lib.client.common_lib.cros import dev_server
33from autotest_lib.server.cros import provision
34from autotest_lib.server.cros.dynamic_suite import dynamic_suite
35
36# Needs to be done to generate the control files for the suite.
37ds = dev_server.ImageServer(devserver_url)
38ds.stage_artifacts(build, artifacts=['au_suite'])
39
40# Values specified in this bug template will override default values when
41# filing bugs on tests that are a part of this suite. If left unspecified
42# the bug filer will fallback to it's defaults.
43_BUG_TEMPLATE = {
44    'components': ['Internals>Installer'],
45    'owner': '',
46    'status': None,
47    'summary': None,
48    'title': None,
49    'cc': ['chromeos-installer-alerts@google.com']
50}
51
52# TODO(sosa): Really should skip_reimage but suite logic does not currently
53# work without reimaging.
54args_dict['max_runtime_mins'] = 60
55args_dict['name'] = 'au'
56args_dict['job'] = job
57args_dict['add_experimental'] = True
58args_dict['version_prefix'] = provision.CROS_VERSION_PREFIX
59args_dict['bug_template'] = _BUG_TEMPLATE
60
61dynamic_suite.reimage_and_run(**args_dict)
62