blob: 3e8a34418e33896426f64ce10a0681a8b53e44be [file] [log] [blame]
David Haddock1479fc62016-10-24 17:06:01 -07001# Copyright 2016 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 = "ARC++ Team"
6NAME = "gts"
7PURPOSE = "GTS tests for ARC++"
8CRITERIA = "All tests with SUITE=gts must pass."
9
10TIME = "SHORT"
11TEST_CATEGORY = "General"
12TEST_CLASS = "suite"
13TEST_TYPE = "Server"
14
15DOC = """
16This suite wraps the current GTS bundle for autotest.
17"""
18
19import common
20from autotest_lib.server.cros import provision
21from autotest_lib.server.cros.dynamic_suite import dynamic_suite
22
23
Keith Haddow7e074d52017-05-23 11:51:52 -070024def predicate(test):
25 if not hasattr(test, 'suite') or not hasattr(test, 'name'):
26 return False
27 if not test.suite == NAME:
28 return False
29 # Strip off the cheets_GTS. from the test name before comparing to args
Allen Li5272c9e2017-08-23 18:42:05 -070030 name = test.name[test.name.find('.') + 1:]
Allen Li3c0d6cb2017-08-21 17:05:57 -070031 # TODO(crbug.com/758427): suite_args needed to support being run by old Autotest
32 try:
Allen Li905d6a32017-08-30 12:46:53 -070033 if suite_args and name not in suite_args:
Allen Li3c0d6cb2017-08-21 17:05:57 -070034 return False
35 except NameError:
36 pass
Allen Li905d6a32017-08-30 12:46:53 -070037 if 'tests' in args_dict and name not in args_dict['tests']:
38 return False
Keith Haddow7e074d52017-05-23 11:51:52 -070039 return True
40
David Haddock1479fc62016-10-24 17:06:01 -070041args_dict['name'] = NAME
42args_dict['job'] = job
43args_dict['add_experimental'] = True
44args_dict['version_prefix'] = provision.CROS_VERSION_PREFIX
Keith Haddow7e074d52017-05-23 11:51:52 -070045args_dict['predicate'] = predicate
David Haddock1479fc62016-10-24 17:06:01 -070046dynamic_suite.reimage_and_run(**args_dict)
47