1# 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.dynamic_suite import dynamic_suite 21 22 23def predicate(test): 24 if not hasattr(test, 'suite') or not hasattr(test, 'name'): 25 return False 26 if not test.suite == NAME: 27 return False 28 # Strip off the cheets_GTS. from the test name before comparing to args 29 name = test.name[test.name.find('.') + 1:] 30 # Typical examples: 31 # name = 'arm.CtsDeqpTestCases.64' 32 # or 33 # name = 'x86.CtsDeqpTestCases.32' 34 # and 35 # args_dict['tests'] = ['arm.CtsDeqpTestCases', 'x86.CtsDeqpTestCases'] 36 # So, we want to includes test with names being subpart of any arg. 37 if 'tests' in args_dict and all(arg not in name for arg in args_dict['tests']): 38 return False 39 return True 40 41args_dict['name'] = NAME 42args_dict['job'] = job 43args_dict['add_experimental'] = True 44args_dict['predicate'] = predicate 45dynamic_suite.reimage_and_run(**args_dict) 46 47