1#!/usr/bin/env python2 2# Copyright 2020 The Chromium OS Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6import collections 7 8# The dashboard suppresses upload to APFE for GS directories (based on autotest 9# tag) that contain 'tradefed-run-collect-tests'. b/119640440 10# Do not change the name/tag without adjusting the dashboard. 11_COLLECT = 'tradefed-run-collect-tests-only-internal' 12_PUBLIC_COLLECT = 'tradefed-run-collect-tests-only' 13_ALL = 'all' 14 15CONFIG = {} 16 17CONFIG['TEST_NAME'] = 'cheets_GTS_R' 18CONFIG['DOC_TITLE'] = 'Android Google Test Suite (GTS)' 19CONFIG['MOBLAB_SUITE_NAME'] = 'suite:gts' 20CONFIG['COPYRIGHT_YEAR'] = 2020 21 22CONFIG['AUTHKEY'] = 'gs://chromeos-arc-images/cts/bundle/gts-arc.json' 23CONFIG['TRADEFED_IGNORE_BUSINESS_LOGIC_FAILURE'] = True 24 25CONFIG['LARGE_MAX_RESULT_SIZE'] = 500 * 1024 26CONFIG['NORMAL_MAX_RESULT_SIZE'] = 300 * 1024 27 28CONFIG['TRADEFED_CTS_COMMAND'] ='gts' 29CONFIG['TRADEFED_RETRY_COMMAND'] = 'retry' 30CONFIG['TRADEFED_DISABLE_REBOOT'] = False 31CONFIG['TRADEFED_DISABLE_REBOOT_ON_COLLECTION'] = True 32CONFIG['TRADEFED_MAY_SKIP_DEVICE_INFO'] = False 33CONFIG['NEEDS_DEVICE_INFO'] = [] 34CONFIG['TRADEFED_EXECUTABLE_PATH'] = 'android-gts/tools/gts-tradefed' 35 36# For now only run as a part of arc-cts-r. 37# TODO(kinaba): move to arc-gts and arc-gts-qual after R 38# got out from the experimental state. 39CONFIG['INTERNAL_SUITE_NAMES'] = ['suite:arc-cts-r'] 40CONFIG['QUAL_SUITE_NAMES'] = [] 41 42CONFIG['CONTROLFILE_TEST_FUNCTION_NAME'] = 'run_TS' 43CONFIG['CONTROLFILE_WRITE_SIMPLE_QUAL_AND_REGRESS'] = False 44CONFIG['CONTROLFILE_WRITE_CAMERA'] = False 45CONFIG['CONTROLFILE_WRITE_EXTRA'] = False 46 47CONFIG['CTS_JOB_RETRIES_IN_PUBLIC'] = 2 48CONFIG['CTS_QUAL_RETRIES'] = 9 49CONFIG['CTS_MAX_RETRIES'] = {} 50 51# Timeout in hours. 52# Modules that run very long are encoded here. 53CONFIG['CTS_TIMEOUT_DEFAULT'] = 0.2 54CONFIG['CTS_TIMEOUT'] = { 55 'GtsExoPlayerTestCases': 1.5, 56 'GtsGmscoreHostTestCases': 1.0, 57 'GtsMediaTestCases': 4, 58 'GtsYouTubeTestCases': 1.0, 59 _ALL: 24, 60 _COLLECT: 0.5, 61 _PUBLIC_COLLECT: 0.5, 62} 63 64# Any test that runs as part as blocking BVT needs to be stable and fast. For 65# this reason we enforce a tight timeout on these modules/jobs. 66# Timeout in hours. (0.1h = 6 minutes) 67CONFIG['BVT_TIMEOUT'] = 0.1 68# We allow a very long runtime for qualification (1 day). 69CONFIG['QUAL_TIMEOUT'] = 24 70 71# TODO(kinab): Set up when we move the test to arc-gts-qual 72CONFIG['QUAL_BOOKMARKS'] = sorted([]) 73 74CONFIG['SMOKE'] = [] 75 76CONFIG['BVT_ARC'] = [] 77 78CONFIG['BVT_PERBUILD'] = [] 79 80CONFIG['NEEDS_POWER_CYCLE'] = [] 81 82CONFIG['HARDWARE_DEPENDENT_MODULES'] = [] 83 84CONFIG['VMTEST_INFO_SUITES'] = collections.OrderedDict() 85 86# Modules that are known to download and/or push media file assets. 87CONFIG['MEDIA_MODULES'] = ['GtsYouTubeTestCases'] 88CONFIG['NEEDS_PUSH_MEDIA'] = CONFIG['MEDIA_MODULES'] + [_ALL] 89CONFIG['ENABLE_DEFAULT_APPS'] = [] 90 91# Preconditions applicable to public and internal tests. 92CONFIG['PRECONDITION'] = {} 93CONFIG['LOGIN_PRECONDITION'] = {} 94 95CONFIG['LAB_DEPENDENCY'] = {} 96 97# Preconditions applicable to public tests. 98CONFIG['PUBLIC_PRECONDITION'] = {} 99CONFIG['PUBLIC_DEPENDENCIES'] = {} 100 101# This information is changed based on regular analysis of the failure rate on 102# partner moblabs. 103CONFIG['PUBLIC_MODULE_RETRY_COUNT'] = { 104 _ALL: 2, 105 'GtsMediaTestCases': 5, # TODO(b/140841434) 106 'GtsYouTubeTestCases': 5, # TODO(b/149376356) 107} 108 109CONFIG['PUBLIC_OVERRIDE_TEST_PRIORITY'] = { 110 _PUBLIC_COLLECT: 70, 111} 112 113# This information is changed based on regular analysis of the job run time on 114# partner moblabs. 115 116CONFIG['OVERRIDE_TEST_LENGTH'] = { 117 'GtsMediaTestCases': 4, 118 _ALL: 4, 119 # Even though collect tests doesn't run very long, it must be the very first 120 # job executed inside of the suite. Hence it is the only 'LENGTHY' test. 121 _COLLECT: 5, # LENGTHY 122} 123 124# Enabling --logcat-on-failure can extend total run time significantly if 125# individual tests finish in the order of 10ms or less (b/118836700). Specify 126# modules here to not enable the flag. 127CONFIG['DISABLE_LOGCAT_ON_FAILURE'] = set([]) 128CONFIG['EXTRA_MODULES'] = {} 129CONFIG['PUBLIC_EXTRA_MODULES'] = {} 130CONFIG['EXTRA_SUBMODULE_OVERRIDE'] = {} 131CONFIG['EXTRA_COMMANDLINE'] = {} 132CONFIG['EXTRA_ATTRIBUTES'] = { 133 'tradefed-run-collect-tests-only-internal': ['suite:arc-gts'], 134} 135CONFIG['EXTRA_ARTIFACTS'] = {} 136 137CONFIG['PREREQUISITES'] = { 138 'GtsGmscoreHostTestCases': ['bluetooth'], 139} 140CONFIG['USE_JDK9'] = True 141 142from generate_controlfiles_common import main 143 144if __name__ == '__main__': 145 main(CONFIG) 146 147