1#!/usr/bin/env python2 2# Copyright 2016 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 9CONFIG = {} 10 11CONFIG['TEST_NAME'] = 'cheets_CTS_N' 12CONFIG['DOC_TITLE'] = 'Android Compatibility Test Suite (CTS)' 13CONFIG['MOBLAB_SUITE_NAME'] = 'suite:cts_N' 14CONFIG['COPYRIGHT_YEAR'] = 2016 15CONFIG['AUTHKEY'] = '' 16 17# Both arm, x86 tests results normally is below 100MB. 18# 500MB should be sufficient for CTS tests and dump logs for android-cts. 19CONFIG['LARGE_MAX_RESULT_SIZE'] = 500 * 1024 20 21# Individual module normal produces less results than all modules, which is 22# ranging from 4MB to 50MB. 500MB should be sufficient to handle all the cases. 23CONFIG['NORMAL_MAX_RESULT_SIZE'] = 300 * 1024 24 25CONFIG['TRADEFED_CTS_COMMAND'] = 'cts' 26CONFIG['TRADEFED_RETRY_COMMAND'] = 'cts' 27 28# TODO(yoshiki, kinaba): Flip this to false (and remove the flag itself). On N, 29# this flag is not working and the tradefed never reboots regardless of the 30# flag. 31CONFIG['TRADEFED_DISABLE_REBOOT'] = True 32 33CONFIG['TRADEFED_DISABLE_REBOOT_ON_COLLECTION'] = False 34 35# TODO(yoshiki, kinaba): Flip this to False (and remove the flag itself). 36CONFIG['TRADEFED_MAY_SKIP_DEVICE_INFO'] = True 37 38CONFIG['TRADEFED_EXECUTABLE_PATH'] = 'android-cts/tools/cts-tradefed' 39CONFIG['TRADEFED_IGNORE_BUSINESS_LOGIC_FAILURE'] = False 40 41# As this is not called for the "all" runs we can safely assume that each module 42# runs in suite:arc-cts. 43CONFIG['INTERNAL_SUITE_NAMES'] = ['suite:arc-cts'] 44CONFIG['QUAL_SUITE_NAMES'] = ['suite:arc-cts-qual'] 45 46CONFIG['CONTROLFILE_TEST_FUNCTION_NAME'] = 'run_TS' 47CONFIG['CONTROLFILE_WRITE_SIMPLE_QUAL_AND_REGRESS'] = False 48CONFIG['CONTROLFILE_WRITE_CAMERA'] = True 49CONFIG['CONTROLFILE_WRITE_EXTRA'] = True 50 51# The dashboard suppresses upload to APFE for GS directories (based on autotest 52# tag) that contain 'tradefed-run-collect-tests'. b/119640440 53# Do not change the name/tag without adjusting the dashboard. 54_COLLECT = 'tradefed-run-collect-tests-only-internal' 55_PUBLIC_COLLECT = 'tradefed-run-collect-tests-only' 56 57CONFIG['LAB_DEPENDENCY'] = { 58 'x86': ['cts_abi_x86'] 59} 60 61CONFIG['CTS_JOB_RETRIES_IN_PUBLIC'] = 2 62CONFIG['CTS_QUAL_RETRIES'] = 9 63CONFIG['CTS_MAX_RETRIES'] = {} 64 65# TODO(ihf): Update from wmatrix data. 66# Times guessed by looking for times > 20m in 67# grep runtime-hint android-cts/testcases/*.config 68# Timeout in hours. 69CONFIG['CTS_TIMEOUT_DEFAULT'] = 1.0 70CONFIG['CTS_TIMEOUT'] = { 71 'CtsAppSecurityHostTestCases': 1.5, 72 'CtsDeqpTestCases': 12.0, 73 'CtsDeqpTestCases.dEQP-EGL' : 2.0, 74 'CtsDeqpTestCases.dEQP-GLES2': 2.0, 75 'CtsDeqpTestCases.dEQP-GLES3': 6.0, 76 'CtsDeqpTestCases.dEQP-GLES31': 12.0, 77 'CtsDeqpTestCases.dEQP-VK': 12.0, 78 'CtsDevicePolicyManagerTestCases': 2.0, 79 'CtsFileSystemTestCases': 2.5, 80 'CtsHardwareTestCases': 3.0, 81 'CtsIcuTestCases': 2.0, 82 'CtsLibcoreOjTestCases': 2.5, 83 'CtsLibcoreTestCases': 1.5, 84 'CtsMediaStressTestCases': 6.0, 85 'CtsMediaTestCases': 6.0, 86 'CtsPrintTestCases': 3.0, 87 'CtsSecurityHostTestCases': 1.5, 88 'CtsSecurityTestCases': 1.5, 89 'CtsShortcutHostTestCases': 1.5, 90 'CtsThemeHostTestCases': 6.0, 91 'CtsVmTestCases': 1.5, 92 'vm-tests-tf': 2.0, 93 _COLLECT: 0.6667, 94 _PUBLIC_COLLECT: 0.6667, 95} 96 97# Any test that runs as part as blocking BVT needs to be stable and fast. For 98# this reason we enforce a tight timeout on these modules/jobs. 99# Timeout in hours. (0.1h = 6 minutes) 100CONFIG['BVT_TIMEOUT'] = 0.1 101# We allow a very long runtime for qualification (2 days). 102CONFIG['QUAL_TIMEOUT'] = 48 103 104CONFIG['QUAL_BOOKMARKS'] = sorted([ 105 'A', # A bookend to simplify partition algorithm. 106 'CtsActivityManagerDevice', # Runs long enough. (3h) 107 'CtsActivityManagerDevicez', 108 'CtsDeqpTestCases', 109 'CtsDeqpTestCasesz', # Put Deqp in one control file. Long enough, fairly stable. 110 'CtsFileSystemTestCases', # Runs long enough. (3h) 111 'CtsFileSystemTestCasesz', 112 'CtsMedia', # Put Media module in its own control file. Long enough. 113 'CtsMediaz', 114 'CtsSecurityHostTestCasesz', # Split SecurityHost and Simpleperf preconditions 115 'zzzzz' # A bookend to simplify algorithm. 116]) 117 118CONFIG['SMOKE'] = [ 119 'CtsDramTestCases', 120] 121 122CONFIG['BVT_ARC'] = [ 123 'CtsAccelerationTestCases', 124 'CtsAccountManagerTestCases', 125] 126 127CONFIG['BVT_PERBUILD'] = [ 128 'CtsAccountManagerTestCases', 129 'CtsAppUsageHostTestCases', 130 'CtsDeviceAdminUninstallerTestCases', 131 'CtsDramTestCases', 132 'CtsGraphicsTestCases', 133 'CtsJankDeviceTestCases', 134 'CtsOpenGLTestCases', 135 'CtsOpenGlPerf2TestCases', 136 'CtsPermission2TestCases', 137 'CtsSignatureTestCases', 138 'CtsSimpleperfTestCases', 139 'CtsSpeechTestCases', 140 'CtsTelecomTestCases', 141 'CtsTelephonyTestCases', 142 'CtsThemeDeviceTestCases', 143 'CtsTransitionTestCases', 144 'CtsTvTestCases', 145 'CtsUiAutomationTestCases', 146 'CtsUsbTests', 147 'CtsVoiceSettingsTestCases', 148] 149 150CONFIG['NEEDS_POWER_CYCLE'] = [ 151 'CtsBluetoothTestCases', 152] 153 154CONFIG['HARDWARE_DEPENDENT_MODULES'] = [] 155 156# The suite is divided based on the run-time hint in the *.config file. 157CONFIG['VMTEST_INFO_SUITES'] = collections.OrderedDict() 158# This is the default suite for all the modules that are not specified below. 159CONFIG['VMTEST_INFO_SUITES']['vmtest-informational1'] = [] 160CONFIG['VMTEST_INFO_SUITES']['vmtest-informational2'] = [ 161 'CtsMediaTestCases', 'CtsMediaStressTestCases', 'CtsHardwareTestCases' 162] 163CONFIG['VMTEST_INFO_SUITES']['vmtest-informational3'] = [ 164 'CtsThemeHostTestCases', 'CtsHardwareTestCases', 'CtsLibcoreTestCases' 165] 166CONFIG['VMTEST_INFO_SUITES']['vmtest-informational4'] = [''] 167 168# Modules that are known to download and/or push media file assets. 169# TODO(ihf): Check if the media modules are not needed in N? 170CONFIG['MEDIA_MODULES'] = [ 171] 172 173# TODO(yoshiki, kinaba): merge it with MEDIA_MODULES. 174CONFIG['NEEDS_PUSH_MEDIA'] = [ 175 'CtsMediaStressTestCases', 176] 177 178# Modules that are known to need the default apps of Chrome (eg. Files.app). 179CONFIG['ENABLE_DEFAULT_APPS'] = [ 180 'CtsAppSecurityHostTestCases', 181 'CtsContentTestCases', 182] 183 184# TODO(kinaba, b/110869932): remove this. 185# The tests do not really require the device-info collection step to run, 186# but they are greatly stabilized if the step is inserted before running the 187# actual test content (presumably because the test needs some warm-up time 188# after boot to collect the tested stats?) 189# 190# For now as a workaround, we avoid adding --skip-device-info flag. 191# This is only for N. 192CONFIG['NEEDS_DEVICE_INFO'] = [ 193 'CtsDumpsysHostTestCases', 194] 195 196# Run `eject` for (and only for) each device with RM=1 in lsblk output. 197_EJECT_REMOVABLE_DISK_COMMAND = ( 198 "\'lsblk -do NAME,RM | sed -n s/1$//p | xargs -n1 eject\'") 199# Behave more like in the verififed mode. 200_SECURITY_PARANOID_COMMAND = ( 201 "\'echo 3 > /proc/sys/kernel/perf_event_paranoid\'") 202# TODO(kinaba): Come up with a less hacky way to handle the situation. 203# {0} is replaced with the retry count. Writes either 1 (required by 204# CtsSimpleperfTestCases) or 3 (CtsSecurityHostTestCases). 205_ALTERNATING_PARANOID_COMMAND = ( 206 "\'echo $(({0} % 2 * 2 + 1)) > /proc/sys/kernel/perf_event_paranoid\'") 207# Expose /proc/config.gz 208_CONFIG_MODULE_COMMAND = "\'modprobe configs\'" 209 210# Preconditions applicable to public and internal tests. 211CONFIG['PRECONDITION'] = { 212 'CtsSecurityHostTestCases': [ 213 _SECURITY_PARANOID_COMMAND, # _CONFIG_MODULE_COMMAND 214 ], 215} 216CONFIG['LOGIN_PRECONDITION'] = { 217 'CtsAppSecurityHostTestCases': [_EJECT_REMOVABLE_DISK_COMMAND], 218 'CtsJobSchedulerTestCases': [_EJECT_REMOVABLE_DISK_COMMAND], 219 'CtsMediaTestCases': [_EJECT_REMOVABLE_DISK_COMMAND], 220 'CtsOsTestCases': [_EJECT_REMOVABLE_DISK_COMMAND], 221 'CtsProviderTestCases': [_EJECT_REMOVABLE_DISK_COMMAND], 222} 223 224_WIFI_CONNECT_COMMANDS = [ 225 # These needs to be in order. 226 "'/usr/local/autotest/cros/scripts/wifi connect %s %s\' % (ssid, wifipass)", 227 "'/usr/local/autotest/cros/scripts/reorder-services-moblab.sh wifi'" 228] 229 230# Preconditions applicable to public tests. 231CONFIG['PUBLIC_PRECONDITION'] = { 232 'CtsSecurityHostTestCases': [ 233 _SECURITY_PARANOID_COMMAND, # _CONFIG_MODULE_COMMAND 234 ], 235 'CtsUsageStatsTestCases': _WIFI_CONNECT_COMMANDS, 236 'CtsNetTestCases': _WIFI_CONNECT_COMMANDS, 237 'CtsLibcoreTestCases': _WIFI_CONNECT_COMMANDS, 238} 239 240CONFIG['PUBLIC_DEPENDENCIES'] = { 241 'CtsCameraTestCases': ['lighting'], 242 'CtsMediaTestCases': ['noloopback'], 243} 244 245# This information is changed based on regular analysis of the failure rate on 246# partner moblabs. 247CONFIG['PUBLIC_MODULE_RETRY_COUNT'] = { 248 'CtsNetTestCases': 10, 249 'CtsSecurityHostTestCases': 10, 250 'CtsUsageStatsTestCases': 10, 251 'CtsFileSystemTestCases': 10, 252 'CtsBluetoothTestCases': 10, 253} 254 255CONFIG['PUBLIC_OVERRIDE_TEST_PRIORITY'] = { 256 _PUBLIC_COLLECT: 70, 257} 258 259# This information is changed based on regular analysis of the job run time on 260# partner moblabs. 261 262CONFIG['OVERRIDE_TEST_LENGTH'] = { 263 'CtsDeqpTestCases': 4, # LONG 264 'CtsMediaTestCases': 4, 265 'CtsMediaStressTestCases': 4, 266 'CtsSecurityTestCases': 4, 267 'CtsCameraTestCases': 4, 268 # Even though collect tests doesn't run very long, it must be the very first 269 # job executed inside of the suite. Hence it is the only 'LENGTHY' test. 270 _COLLECT: 5, # LENGTHY 271} 272 273# Enabling --logcat-on-failure can extend total run time significantly if 274# individual tests finish in the order of 10ms or less (b/118836700). Specify 275# modules here to not enable the flag. 276CONFIG['DISABLE_LOGCAT_ON_FAILURE'] = set([ 277 'CtsDeqpTestCases', 278 'CtsDeqpTestCases.dEQP-EGL', 279 'CtsDeqpTestCases.dEQP-GLES2', 280 'CtsDeqpTestCases.dEQP-GLES3', 281 'CtsDeqpTestCases.dEQP-GLES31', 282 'CtsDeqpTestCases.dEQP-VK', 283]) 284 285CONFIG['EXTRA_MODULES'] = { 286 'CtsDeqpTestCases': { 287 'SUBMODULES': set([ 288 'CtsDeqpTestCases.dEQP-EGL', 289 'CtsDeqpTestCases.dEQP-GLES2', 290 'CtsDeqpTestCases.dEQP-GLES3', 291 'CtsDeqpTestCases.dEQP-GLES31', 292 'CtsDeqpTestCases.dEQP-VK' 293 ]), 294 'SUITES': ['suite:arc-cts-deqp', 'suite:graphics_per-week'], 295 }, 296} 297 298CONFIG['PUBLIC_EXTRA_MODULES'] = {} 299 300CONFIG['EXTRA_SUBMODULE_OVERRIDE'] = {} 301 302CONFIG['EXTRA_COMMANDLINE'] = { 303 'CtsDeqpTestCases.dEQP-EGL': [ 304 '--include-filter', 'CtsDeqpTestCases', '--module', 'CtsDeqpTestCases', 305 '--test', 'dEQP-EGL.*' 306 ], 307 'CtsDeqpTestCases.dEQP-GLES2': [ 308 '--include-filter', 'CtsDeqpTestCases', '--module', 'CtsDeqpTestCases', 309 '--test', 'dEQP-GLES2.*' 310 ], 311 'CtsDeqpTestCases.dEQP-GLES3': [ 312 '--include-filter', 'CtsDeqpTestCases', '--module', 'CtsDeqpTestCases', 313 '--test', 'dEQP-GLES3.*' 314 ], 315 'CtsDeqpTestCases.dEQP-GLES31': [ 316 '--include-filter', 'CtsDeqpTestCases', '--module', 'CtsDeqpTestCases', 317 '--test', 'dEQP-GLES31.*' 318 ], 319 'CtsDeqpTestCases.dEQP-VK': [ 320 '--include-filter', 'CtsDeqpTestCases', '--module', 'CtsDeqpTestCases', 321 '--test', 'dEQP-VK.*' 322 ], 323} 324 325CONFIG['EXTRA_ATTRIBUTES'] = { 326 'CtsDeqpTestCases': ['suite:arc-cts', 'suite:arc-cts-deqp'], 327 'CtsDeqpTestCases.dEQP-EGL': [ 328 'suite:arc-cts-deqp', 'suite:graphics_per-week' 329 ], 330 'CtsDeqpTestCases.dEQP-GLES2': [ 331 'suite:arc-cts-deqp', 'suite:graphics_per-week' 332 ], 333 'CtsDeqpTestCases.dEQP-GLES3': [ 334 'suite:arc-cts-deqp', 'suite:graphics_per-week' 335 ], 336 'CtsDeqpTestCases.dEQP-GLES31': [ 337 'suite:arc-cts-deqp', 'suite:graphics_per-week' 338 ], 339 'CtsDeqpTestCases.dEQP-VK': [ 340 'suite:arc-cts-deqp', 'suite:graphics_per-week' 341 ], 342 _COLLECT: ['suite:arc-cts-qual', 'suite:arc-cts'], 343} 344 345CONFIG['EXTRA_ARTIFACTS'] = { 346} 347 348CONFIG['PREREQUISITES'] = { 349} 350 351from generate_controlfiles_common import main 352 353if __name__ == '__main__': 354 main(CONFIG) 355