xref: /aosp_15_r20/external/autotest/server/cros/tradefed/generate_controlfiles_CTS_P.py (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1#!/usr/bin/env python3
2# Lint as: python2, python3
3# Copyright 2016 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7import collections
8
9
10CONFIG = {}
11
12CONFIG['TEST_NAME'] = 'cheets_CTS_P'
13CONFIG['DOC_TITLE'] = 'Android Compatibility Test Suite (CTS)'
14CONFIG['MOBLAB_SUITE_NAME'] = 'suite:cts_P, suite:cts'
15CONFIG['MOBLAB_HARDWARE_SUITE_NAME'] = 'suite:cts-hardware'
16CONFIG['COPYRIGHT_YEAR'] = 2018
17CONFIG['AUTHKEY'] = ''
18
19# Both arm, x86 tests results normally is below 200MB.
20# 1000MB should be sufficient for CTS tests and dump logs for android-cts.
21CONFIG['LARGE_MAX_RESULT_SIZE'] = 1000 * 1024
22
23# Individual module normal produces less results than all modules, which is
24# ranging from 4MB to 50MB. 500MB should be sufficient to handle all the cases.
25CONFIG['NORMAL_MAX_RESULT_SIZE'] = 500 * 1024
26
27CONFIG['TRADEFED_CTS_COMMAND'] = 'cts'
28CONFIG['TRADEFED_RETRY_COMMAND'] = 'retry'
29CONFIG['TRADEFED_DISABLE_REBOOT'] = False
30CONFIG['TRADEFED_DISABLE_REBOOT_ON_COLLECTION'] = True
31CONFIG['TRADEFED_MAY_SKIP_DEVICE_INFO'] = False
32CONFIG['TRADEFED_EXECUTABLE_PATH'] = 'android-cts/tools/cts-tradefed'
33CONFIG['TRADEFED_IGNORE_BUSINESS_LOGIC_FAILURE'] = False
34
35# module runs in suite:arc-cts on boards, and each module runs in
36# suite:arc-cts-unibuild on selected models.
37CONFIG['INTERNAL_SUITE_NAMES'] = ['suite:arc-cts', 'suite:arc-cts-unibuild']
38CONFIG['QUAL_SUITE_NAMES'] = ['suite:arc-cts-qual']
39CONFIG['HARDWARE_SUITE_NAME'] = 'suite:arc-cts-hardware'
40
41CONFIG['CONTROLFILE_TEST_FUNCTION_NAME'] = 'run_TS'
42CONFIG['CONTROLFILE_WRITE_SIMPLE_QUAL_AND_REGRESS'] = False
43CONFIG['CONTROLFILE_WRITE_CAMERA'] = True
44CONFIG['CONTROLFILE_WRITE_EXTRA'] = True
45
46# The dashboard suppresses upload to APFE for GS directories (based on autotest
47# tag) that contain 'tradefed-run-collect-tests'. b/119640440
48# Do not change the name/tag without adjusting the dashboard.
49_COLLECT = 'tradefed-run-collect-tests-only-internal'
50_PUBLIC_COLLECT = 'tradefed-run-collect-tests-only'
51
52# Test module name for WM presubmit tests.
53_WM_PRESUBMIT = 'wm-presubmit'
54
55CONFIG['LAB_DEPENDENCY'] = {
56    'x86': ['cts_abi_x86']
57}
58
59CONFIG['CTS_JOB_RETRIES_IN_PUBLIC'] = 1
60CONFIG['CTS_QUAL_RETRIES'] = 9
61CONFIG['CTS_MAX_RETRIES'] = {
62    'CtsDeqpTestCases':         15,  # TODO(b/126787654)
63    'CtsGraphicsTestCases':      5,  # TODO(b/155056869)
64    'CtsSensorTestCases':       30,  # TODO(b/124528412)
65}
66
67# Timeout in hours.
68CONFIG['CTS_TIMEOUT_DEFAULT'] = 1.0
69CONFIG['CTS_TIMEOUT'] = {
70        'CtsActivityManagerDeviceTestCases': 2.0,
71        'CtsAppSecurityHostTestCases': 4.0,  # TODO(b/172409836)
72        'CtsAutoFillServiceTestCases': 6.0,  # TODO(b/145092442)
73        'CtsCameraTestCases': 2.0,  # TODO(b/150657700)
74        'CtsDeqpTestCases': 20.0,
75        'CtsDeqpTestCases.dEQP-EGL': 2.0,
76        'CtsDeqpTestCases.dEQP-GLES2': 2.0,
77        'CtsDeqpTestCases.dEQP-GLES3': 6.0,
78        'CtsDeqpTestCases.dEQP-GLES31': 6.0,
79        'CtsDeqpTestCases.dEQP-VK': 15.0,
80        'CtsFileSystemTestCases': 3.0,
81        'CtsIcuTestCases': 2.0,
82        'CtsLibcoreOjTestCases': 2.0,
83        'CtsMediaStressTestCases': 5.0,
84        'CtsMediaTestCases': 10.0,
85        'CtsPrintTestCases': 1.5,
86        'CtsSecurityTestCases': 2.0,
87        'CtsVideoTestCases': 1.5,
88        'CtsWidgetTestCases': 1.5,
89        _COLLECT: 2.5,
90        _PUBLIC_COLLECT: 2.5,
91        _WM_PRESUBMIT: 0.2,
92}
93
94# Any test that runs as part as blocking BVT needs to be stable and fast. For
95# this reason we enforce a tight timeout on these modules/jobs.
96# Timeout in hours. (0.2h = 12 minutes)
97#
98# For the test content 5 minutes are more than enough, but when some component
99# (typically camera) is stuck, the CTS precondition step hits 5 minute abort.
100# Since this abort doesn't affect too much for the main CTS runs (with longer
101# timeouts), it's ok to let them go in. Bad state of camre should be caught by
102# camera tests, not by this general test harness health check for CTS.
103CONFIG['BVT_TIMEOUT'] = 0.2
104
105CONFIG['QUAL_BOOKMARKS'] = sorted([
106        'A',  # A bookend to simplify partition algorithm.
107        'CtsAccessibilityServiceTestCases',  # TODO(ihf) remove when b/121291711 fixed. This module causes problems. Put it into its own control file.
108        'CtsAccessibilityServiceTestCasesz',
109        'CtsActivityManagerDevice',  # Runs long enough. (3h)
110        'CtsActivityManagerDevicez',
111        'CtsCameraTestCases',  # Recurrenly becomes flaky and affects other tests.
112        'CtsCameraTestCasesz',
113        'CtsDeqpTestCases',
114        'CtsDeqpTestCasesz',  # Put Deqp in one control file. Long enough, fairly stable.
115        'CtsFileSystemTestCases',  # Runs long enough. (3h)
116        'CtsFileSystemTestCasesz',
117        'CtsMediaBitstreamsTestCases',  # Put each Media module in its own control file. Long enough.
118        'CtsMediaHostTestCases',
119        'CtsMediaStressTestCases',
120        'CtsMediaTestCases',
121        'CtsMediaTestCasesz',
122        'CtsJvmti',
123        'CtsSecurityHostTestCases',  # TODO(ihf): remove when passing cleanly.
124        'CtsSecurityHostTestCasesz',
125        'CtsSensorTestCases',  # TODO(ihf): Remove when not needing 30 retries.
126        'CtsSensorTestCasesz',
127        'CtsViewTestCases',  # TODO(b/126741318): Fix performance regression and remove this.
128        'CtsViewTestCasesz',
129        'zzzzz'  # A bookend to simplify algorithm.
130])
131
132CONFIG['SMOKE'] = [
133    _WM_PRESUBMIT,
134]
135
136CONFIG['BVT_ARC'] = [
137    'CtsAccelerationTestCases',
138]
139
140CONFIG['BVT_PERBUILD'] = [
141    'CtsAccountManagerTestCases',
142    'CtsGraphicsTestCases',
143    'CtsJankDeviceTestCases',
144    'CtsOpenGLTestCases',
145    'CtsOpenGlPerf2TestCases',
146    'CtsPermission2TestCases',
147    'CtsSimpleperfTestCases',
148    'CtsSpeechTestCases',
149    'CtsTelecomTestCases',
150    'CtsTelephonyTestCases',
151    'CtsThemeDeviceTestCases',
152    'CtsTransitionTestCases',
153    'CtsTvTestCases',
154    'CtsUsbTests',
155    'CtsVoiceSettingsTestCases',
156]
157
158CONFIG['NEEDS_POWER_CYCLE'] = [
159    'CtsBluetoothTestCases',
160]
161
162CONFIG['HARDWARE_DEPENDENT_MODULES'] = [
163    'CtsSensorTestCases',
164    'CtsCameraTestCases',
165    'CtsBluetoothTestCases',
166]
167
168# The suite is divided based on the run-time hint in the *.config file.
169CONFIG['VMTEST_INFO_SUITES'] = collections.OrderedDict()
170
171# Modules that are known to download and/or push media file assets.
172CONFIG['MEDIA_MODULES'] = [
173    'CtsMediaTestCases',
174    'CtsMediaStressTestCases',
175    'CtsMediaBitstreamsTestCases',
176]
177
178CONFIG['NEEDS_PUSH_MEDIA'] = CONFIG['MEDIA_MODULES'] + [
179        'CtsMediaStressTestCases.camera',
180        'CtsMediaTestCases.audio',
181]
182CONFIG['SPLIT_BY_BITS_MODULES'] = [
183        'CtsDeqpTestCases',
184        'CtsMediaTestCases',
185        'CtsViewTestCases',
186]
187
188# See b/149889853. Non-media test basically does not require dynamic
189# config. To reduce the flakiness, let us suppress the config.
190CONFIG['NEEDS_DYNAMIC_CONFIG_ON_COLLECTION'] = False
191CONFIG['NEEDS_DYNAMIC_CONFIG'] = CONFIG['MEDIA_MODULES'] + [
192        'CtsIntentSignatureTestCases',
193        'CtsMediaStressTestCases.camera',
194]
195
196# Modules that are known to need the default apps of Chrome (eg. Files.app).
197CONFIG['ENABLE_DEFAULT_APPS'] = [
198    'CtsAppSecurityHostTestCases',
199    'CtsContentTestCases',
200]
201
202# Run `eject` for (and only for) each device with RM=1 in lsblk output.
203_EJECT_REMOVABLE_DISK_COMMAND = (
204    "\'lsblk -do NAME,RM | sed -n s/1$//p | xargs -n1 eject\'")
205# Behave more like in the verififed mode.
206_SECURITY_PARANOID_COMMAND = (
207    "\'echo 3 > /proc/sys/kernel/perf_event_paranoid\'")
208# TODO(kinaba): Come up with a less hacky way to handle the situation.
209# {0} is replaced with the retry count. Writes either 1 (required by
210# CtsSimpleperfTestCases) or 3 (CtsSecurityHostTestCases).
211_ALTERNATING_PARANOID_COMMAND = (
212    "\'echo $(({0} % 2 * 2 + 1)) > /proc/sys/kernel/perf_event_paranoid\'")
213# Expose /proc/config.gz
214_CONFIG_MODULE_COMMAND = "\'modprobe configs\'"
215
216# TODO(b/126741318): Fix performance regression and remove this.
217_SLEEP_60_COMMAND = "\'sleep 60\'"
218
219_START_MDNS_COMMAND = "\'android-sh -c \\\'setprop ctl.start mdnsd\\\'\'"
220
221_WIFI_CONNECT_COMMANDS_V2 = [
222        # These needs to be in order.
223        "'adb shell cmd wifi add-network %s %s %s' % (pipes.quote(ssid), 'open' if wifipass == '' else 'wpa', pipes.quote(wifipass))",
224        "'adb shell cmd wifi connect-network %s' % pipes.quote(ssid)",
225        "'adb shell dumpsys wifi transports -eth'",
226]
227
228# Preconditions applicable to public and internal tests.
229CONFIG['PRECONDITION'] = {
230        'CtsSecurityHostTestCases':
231        [_SECURITY_PARANOID_COMMAND, _CONFIG_MODULE_COMMAND],
232        # Tests are performance-sensitive, workaround to avoid CPU load on login.
233        # TODO(b/126741318): Fix performance regression and remove this.
234        'CtsViewTestCases': [_SLEEP_60_COMMAND],
235        'CtsNetTestCases': [_START_MDNS_COMMAND],
236}
237CONFIG['LOGIN_PRECONDITION'] = {
238    'CtsAppSecurityHostTestCases': [_EJECT_REMOVABLE_DISK_COMMAND],
239    'CtsJobSchedulerTestCases': [_EJECT_REMOVABLE_DISK_COMMAND],
240    'CtsMediaTestCases': [_EJECT_REMOVABLE_DISK_COMMAND],
241    'CtsOsTestCases': [_EJECT_REMOVABLE_DISK_COMMAND],
242    'CtsProviderTestCases': [_EJECT_REMOVABLE_DISK_COMMAND],
243}
244
245_WIFI_CONNECT_COMMANDS = [
246    # These needs to be in order.
247    "'/usr/local/autotest/cros/scripts/wifi connect %s %s\' % (ssid, wifipass)",
248    "'/usr/local/autotest/cros/scripts/reorder-services-moblab.sh wifi'"
249]
250
251# Preconditions applicable to public tests.
252CONFIG['PUBLIC_PRECONDITION'] = {
253        'CtsSecurityHostTestCases':
254        [_SECURITY_PARANOID_COMMAND, _CONFIG_MODULE_COMMAND],
255        'CtsUsageStatsTestCases': _WIFI_CONNECT_COMMANDS,
256        'CtsNetTestCases': _WIFI_CONNECT_COMMANDS + [_START_MDNS_COMMAND],
257        'CtsLibcoreTestCases': _WIFI_CONNECT_COMMANDS,
258}
259
260CONFIG['PUBLIC_DEPENDENCIES'] = {
261    'CtsCameraTestCases': ['lighting'],
262    'CtsMediaTestCases': ['noloopback'],
263}
264
265# This information is changed based on regular analysis of the failure rate on
266# partner moblabs.
267CONFIG['PUBLIC_MODULE_RETRY_COUNT'] = {
268    'CtsAccessibilityServiceTestCases':  12,
269    'CtsActivityManagerDeviceTestCases': 12,
270    'CtsBluetoothTestCases':             10,
271    'CtsDeqpTestCases':                  15,
272    'CtsFileSystemTestCases':            10,
273    'CtsGraphicsTestCases':              12,
274    'CtsIncidentHostTestCases':          12,
275    'CtsNetTestCases':                   10,
276    'CtsSecurityHostTestCases':          10,
277    'CtsSensorTestCases':                12,
278    'CtsUsageStatsTestCases':            10,
279    _PUBLIC_COLLECT: 0,
280}
281
282CONFIG['PUBLIC_OVERRIDE_TEST_PRIORITY'] = {
283    _PUBLIC_COLLECT: 70,
284    'CtsDeqpTestCases': 70,
285}
286
287# This information is changed based on regular analysis of the job run time on
288# partner moblabs.
289
290CONFIG['OVERRIDE_TEST_LENGTH'] = {
291    'CtsDeqpTestCases': 4,  # LONG
292    'CtsMediaTestCases': 4,
293    'CtsMediaStressTestCases': 4,
294    'CtsSecurityTestCases': 4,
295    'CtsCameraTestCases': 4,
296    # Even though collect tests doesn't run very long, it must be the very first
297    # job executed inside of the suite. Hence it is the only 'LENGTHY' test.
298    _COLLECT: 5,  # LENGTHY
299}
300
301# Enabling --logcat-on-failure can extend total run time significantly if
302# individual tests finish in the order of 10ms or less (b/118836700). Specify
303# modules here to not enable the flag.
304CONFIG['DISABLE_LOGCAT_ON_FAILURE'] = set([
305    'all',
306    'CtsDeqpTestCases',
307    'CtsDeqpTestCases.dEQP-EGL',
308    'CtsDeqpTestCases.dEQP-GLES2',
309    'CtsDeqpTestCases.dEQP-GLES3',
310    'CtsDeqpTestCases.dEQP-GLES31',
311    'CtsDeqpTestCases.dEQP-VK',
312    'CtsLibcoreTestCases',
313])
314
315# This list of modules will be used for reduced set of testing for build
316# variant process. Suites: cts_hardware & arc-cts-hardware.
317CONFIG['HARDWARE_MODULES'] = [
318        'CtsPerfettoTestCases',
319        'CtsSustainedPerformanceHostTestCases',
320        'CtsCameraTestCases',
321        'CtsViewTestCases',
322        'CtsMediaTestCases',
323        'CtsNativeMediaAAudioTestCases',
324        'CtsNetTestCases',
325        'CtsUsageStatsTestCases',
326        'CtsSensorTestCases',
327]
328
329SUITES_DEQP_SUBMODULE = [
330    'suite:arc-cts-deqp','suite:graphics_per-week']
331
332CONFIG['EXTRA_MODULES'] = {
333        'CtsDeqpTestCases': {
334                'CtsDeqpTestCases.dEQP-EGL': SUITES_DEQP_SUBMODULE,
335                'CtsDeqpTestCases.dEQP-GLES2': SUITES_DEQP_SUBMODULE,
336                'CtsDeqpTestCases.dEQP-GLES3': SUITES_DEQP_SUBMODULE,
337                'CtsDeqpTestCases.dEQP-GLES31': SUITES_DEQP_SUBMODULE,
338                'CtsDeqpTestCases.dEQP-VK': SUITES_DEQP_SUBMODULE,
339        },
340        'CtsMediaTestCases': {
341                'CtsMediaTestCases.audio': ['suite:arc-cts'],
342        },
343        _WM_PRESUBMIT: {
344                _WM_PRESUBMIT: [],
345        },
346}
347
348# In addition to EXTRA_MODULES, these modules do require separate control files
349# requiring separate declaration.
350CONFIG['HARDWAREONLY_EXTRA_MODULES'] = {
351        'CtsAppTestCases': {
352                'CtsAppTestCases.feature': [],
353        },
354        'CtsDeqpTestCases': {
355                'CtsDeqpTestCases.dEQP-GLES3.functional.prerequisite': [],
356        },
357        'CtsMediaStressTestCases': {
358                'CtsMediaStressTestCases.camera': [],
359        },
360        'CtsPermissionTestCases': {
361                'CtsPermissionTestCases.camera': [],
362        },
363}
364
365# Moblab wants to shard dEQP really finely. This isn't needed anymore as it got
366# faster, but I guess better safe than sorry.
367CONFIG['PUBLIC_EXTRA_MODULES'] = {
368        'CtsDeqpTestCases': {
369                # moblab cts suite
370                'CtsDeqpTestCases.dEQP-EGL': [CONFIG['MOBLAB_SUITE_NAME']],
371                'CtsDeqpTestCases.dEQP-GLES2': [CONFIG['MOBLAB_SUITE_NAME']],
372                'CtsDeqpTestCases.dEQP-GLES3': [CONFIG['MOBLAB_SUITE_NAME']],
373                'CtsDeqpTestCases.dEQP-GLES31': [CONFIG['MOBLAB_SUITE_NAME']],
374                'CtsDeqpTestCases.dEQP-VK.api': [CONFIG['MOBLAB_SUITE_NAME']],
375                'CtsDeqpTestCases.dEQP-VK.binding_model':
376                [CONFIG['MOBLAB_SUITE_NAME']],
377                'CtsDeqpTestCases.dEQP-VK.clipping':
378                [CONFIG['MOBLAB_SUITE_NAME']],
379                'CtsDeqpTestCases.dEQP-VK.compute':
380                [CONFIG['MOBLAB_SUITE_NAME']],
381                'CtsDeqpTestCases.dEQP-VK.device_group':
382                [CONFIG['MOBLAB_SUITE_NAME']],
383                'CtsDeqpTestCases.dEQP-VK.draw': [CONFIG['MOBLAB_SUITE_NAME']],
384                'CtsDeqpTestCases.dEQP-VK.dynamic_state':
385                [CONFIG['MOBLAB_SUITE_NAME']],
386                'CtsDeqpTestCases.dEQP-VK.fragment_operations':
387                [CONFIG['MOBLAB_SUITE_NAME']],
388                'CtsDeqpTestCases.dEQP-VK.geometry':
389                [CONFIG['MOBLAB_SUITE_NAME']],
390                'CtsDeqpTestCases.dEQP-VK.glsl': [CONFIG['MOBLAB_SUITE_NAME']],
391                'CtsDeqpTestCases.dEQP-VK.image':
392                [CONFIG['MOBLAB_SUITE_NAME']],
393                'CtsDeqpTestCases.dEQP-VK.info': [CONFIG['MOBLAB_SUITE_NAME']],
394                'CtsDeqpTestCases.dEQP-VK.memory':
395                [CONFIG['MOBLAB_SUITE_NAME']],
396                'CtsDeqpTestCases.dEQP-VK.multiview':
397                [CONFIG['MOBLAB_SUITE_NAME']],
398                'CtsDeqpTestCases.dEQP-VK.pipeline':
399                [CONFIG['MOBLAB_SUITE_NAME']],
400                'CtsDeqpTestCases.dEQP-VK.protected_memory':
401                [CONFIG['MOBLAB_SUITE_NAME']],
402                'CtsDeqpTestCases.dEQP-VK.query_pool': [
403                        CONFIG['MOBLAB_SUITE_NAME']
404                ],
405                'CtsDeqpTestCases.dEQP-VK.rasterization': [
406                        CONFIG['MOBLAB_SUITE_NAME']
407                ],
408                'CtsDeqpTestCases.dEQP-VK.renderpass': [
409                        CONFIG['MOBLAB_SUITE_NAME']
410                ],
411                'CtsDeqpTestCases.dEQP-VK.renderpass2': [
412                        CONFIG['MOBLAB_SUITE_NAME']
413                ],
414                'CtsDeqpTestCases.dEQP-VK.robustness': [
415                        CONFIG['MOBLAB_SUITE_NAME']
416                ],
417                'CtsDeqpTestCases.dEQP-VK.sparse_resources': [
418                        CONFIG['MOBLAB_SUITE_NAME']
419                ],
420                'CtsDeqpTestCases.dEQP-VK.spirv_assembly': [
421                        CONFIG['MOBLAB_SUITE_NAME']
422                ],
423                'CtsDeqpTestCases.dEQP-VK.ssbo': [CONFIG['MOBLAB_SUITE_NAME']],
424                'CtsDeqpTestCases.dEQP-VK.subgroups': [
425                        CONFIG['MOBLAB_SUITE_NAME']
426                ],
427                'CtsDeqpTestCases.dEQP-VK.subgroups.b': [
428                        CONFIG['MOBLAB_SUITE_NAME']
429                ],
430                'CtsDeqpTestCases.dEQP-VK.subgroups.s': [
431                        CONFIG['MOBLAB_SUITE_NAME']
432                ],
433                'CtsDeqpTestCases.dEQP-VK.subgroups.vote': [
434                        CONFIG['MOBLAB_SUITE_NAME']
435                ],
436                'CtsDeqpTestCases.dEQP-VK.subgroups.arithmetic': [
437                        CONFIG['MOBLAB_SUITE_NAME']
438                ],
439                'CtsDeqpTestCases.dEQP-VK.subgroups.clustered': [
440                        CONFIG['MOBLAB_SUITE_NAME']
441                ],
442                'CtsDeqpTestCases.dEQP-VK.subgroups.quad': [
443                        CONFIG['MOBLAB_SUITE_NAME']
444                ],
445                'CtsDeqpTestCases.dEQP-VK.synchronization': [
446                        CONFIG['MOBLAB_SUITE_NAME']
447                ],
448                'CtsDeqpTestCases.dEQP-VK.tessellation': [
449                        CONFIG['MOBLAB_SUITE_NAME']
450                ],
451                'CtsDeqpTestCases.dEQP-VK.texture': [
452                        CONFIG['MOBLAB_SUITE_NAME']
453                ],
454                'CtsDeqpTestCases.dEQP-VK.ubo': [CONFIG['MOBLAB_SUITE_NAME']],
455                'CtsDeqpTestCases.dEQP-VK.wsi': [CONFIG['MOBLAB_SUITE_NAME']],
456                'CtsDeqpTestCases.dEQP-VK.ycbcr': [
457                        CONFIG['MOBLAB_SUITE_NAME']
458                ],
459        },
460}
461
462# TODO(haddowk,kinaba): Hack for b/138622686. Clean up later.
463CONFIG['EXTRA_SUBMODULE_OVERRIDE'] = {
464    'x86': {
465         'CtsDeqpTestCases.dEQP-VK.subgroups.arithmetic': [
466             'CtsDeqpTestCases.dEQP-VK.subgroups.arithmetic.32',
467             'CtsDeqpTestCases.dEQP-VK.subgroups.arithmetic.64',
468         ]
469    }
470}
471
472CONFIG['EXTRA_COMMANDLINE'] = {
473        'CtsAppTestCases.feature': [
474                '--module', 'CtsAppTestCases', '--test',
475                'android.app.cts.SystemFeaturesTest'
476        ],
477        'CtsDeqpTestCases.dEQP-EGL': [
478                '--include-filter', 'CtsDeqpTestCases', '--module',
479                'CtsDeqpTestCases', '--test', 'dEQP-EGL.*'
480        ],
481        'CtsDeqpTestCases.dEQP-GLES2': [
482                '--include-filter', 'CtsDeqpTestCases', '--module',
483                'CtsDeqpTestCases', '--test', 'dEQP-GLES2.*'
484        ],
485        'CtsDeqpTestCases.dEQP-GLES3': [
486                '--include-filter', 'CtsDeqpTestCases', '--module',
487                'CtsDeqpTestCases', '--test', 'dEQP-GLES3.*'
488        ],
489        'CtsDeqpTestCases.dEQP-GLES3.functional.prerequisite': [
490                '--module', 'CtsDeqpTestCases', '--test',
491                'dEQP-GLES3.functional.prerequisite#*'
492        ],
493        'CtsDeqpTestCases.dEQP-GLES31': [
494                '--include-filter', 'CtsDeqpTestCases', '--module',
495                'CtsDeqpTestCases', '--test', 'dEQP-GLES31.*'
496        ],
497        'CtsDeqpTestCases.dEQP-VK': [
498                '--include-filter', 'CtsDeqpTestCases', '--module',
499                'CtsDeqpTestCases', '--test', 'dEQP-VK.*'
500        ],
501        'CtsDeqpTestCases.dEQP-VK.api': [
502                '--include-filter', 'CtsDeqpTestCases', '--module',
503                'CtsDeqpTestCases', '--test', 'dEQP-VK.api.*'
504        ],
505        'CtsDeqpTestCases.dEQP-VK.binding_model': [
506                '--include-filter', 'CtsDeqpTestCases', '--module',
507                'CtsDeqpTestCases', '--test', 'dEQP-VK.binding_model.*'
508        ],
509        'CtsDeqpTestCases.dEQP-VK.clipping': [
510                '--include-filter', 'CtsDeqpTestCases', '--module',
511                'CtsDeqpTestCases', '--test', 'dEQP-VK.clipping.*'
512        ],
513        'CtsDeqpTestCases.dEQP-VK.compute': [
514                '--include-filter', 'CtsDeqpTestCases', '--module',
515                'CtsDeqpTestCases', '--test', 'dEQP-VK.compute.*'
516        ],
517        'CtsDeqpTestCases.dEQP-VK.device_group': [
518                '--include-filter',
519                'CtsDeqpTestCases',
520                '--module',
521                'CtsDeqpTestCases',
522                '--test',
523                'dEQP-VK.device_group*'  # Not ending on .* like most others!
524        ],
525        'CtsDeqpTestCases.dEQP-VK.draw': [
526                '--include-filter', 'CtsDeqpTestCases', '--module',
527                'CtsDeqpTestCases', '--test', 'dEQP-VK.draw.*'
528        ],
529        'CtsDeqpTestCases.dEQP-VK.dynamic_state': [
530                '--include-filter', 'CtsDeqpTestCases', '--module',
531                'CtsDeqpTestCases', '--test', 'dEQP-VK.dynamic_state.*'
532        ],
533        'CtsDeqpTestCases.dEQP-VK.fragment_operations': [
534                '--include-filter', 'CtsDeqpTestCases', '--module',
535                'CtsDeqpTestCases', '--test', 'dEQP-VK.fragment_operations.*'
536        ],
537        'CtsDeqpTestCases.dEQP-VK.geometry': [
538                '--include-filter', 'CtsDeqpTestCases', '--module',
539                'CtsDeqpTestCases', '--test', 'dEQP-VK.geometry.*'
540        ],
541        'CtsDeqpTestCases.dEQP-VK.glsl': [
542                '--include-filter', 'CtsDeqpTestCases', '--module',
543                'CtsDeqpTestCases', '--test', 'dEQP-VK.glsl.*'
544        ],
545        'CtsDeqpTestCases.dEQP-VK.image': [
546                '--include-filter', 'CtsDeqpTestCases', '--module',
547                'CtsDeqpTestCases', '--test', 'dEQP-VK.image.*'
548        ],
549        'CtsDeqpTestCases.dEQP-VK.info': [
550                '--include-filter',
551                'CtsDeqpTestCases',
552                '--module',
553                'CtsDeqpTestCases',
554                '--test',
555                'dEQP-VK.info*'  # Not ending on .* like most others!
556        ],
557        'CtsDeqpTestCases.dEQP-VK.memory': [
558                '--include-filter', 'CtsDeqpTestCases', '--module',
559                'CtsDeqpTestCases', '--test', 'dEQP-VK.memory.*'
560        ],
561        'CtsDeqpTestCases.dEQP-VK.multiview': [
562                '--include-filter', 'CtsDeqpTestCases', '--module',
563                'CtsDeqpTestCases', '--test', 'dEQP-VK.multiview.*'
564        ],
565        'CtsDeqpTestCases.dEQP-VK.pipeline': [
566                '--include-filter', 'CtsDeqpTestCases', '--module',
567                'CtsDeqpTestCases', '--test', 'dEQP-VK.pipeline.*'
568        ],
569        'CtsDeqpTestCases.dEQP-VK.protected_memory': [
570                '--include-filter', 'CtsDeqpTestCases', '--module',
571                'CtsDeqpTestCases', '--test', 'dEQP-VK.protected_memory.*'
572        ],
573        'CtsDeqpTestCases.dEQP-VK.query_pool': [
574                '--include-filter', 'CtsDeqpTestCases', '--module',
575                'CtsDeqpTestCases', '--test', 'dEQP-VK.query_pool.*'
576        ],
577        'CtsDeqpTestCases.dEQP-VK.rasterization': [
578                '--include-filter', 'CtsDeqpTestCases', '--module',
579                'CtsDeqpTestCases', '--test', 'dEQP-VK.rasterization.*'
580        ],
581        'CtsDeqpTestCases.dEQP-VK.renderpass': [
582                '--include-filter', 'CtsDeqpTestCases', '--module',
583                'CtsDeqpTestCases', '--test', 'dEQP-VK.renderpass.*'
584        ],
585        'CtsDeqpTestCases.dEQP-VK.renderpass2': [
586                '--include-filter', 'CtsDeqpTestCases', '--module',
587                'CtsDeqpTestCases', '--test', 'dEQP-VK.renderpass2.*'
588        ],
589        'CtsDeqpTestCases.dEQP-VK.robustness': [
590                '--include-filter', 'CtsDeqpTestCases', '--module',
591                'CtsDeqpTestCases', '--test', 'dEQP-VK.robustness.*'
592        ],
593        'CtsDeqpTestCases.dEQP-VK.sparse_resources': [
594                '--include-filter', 'CtsDeqpTestCases', '--module',
595                'CtsDeqpTestCases', '--test', 'dEQP-VK.sparse_resources.*'
596        ],
597        'CtsDeqpTestCases.dEQP-VK.spirv_assembly': [
598                '--include-filter', 'CtsDeqpTestCases', '--module',
599                'CtsDeqpTestCases', '--test', 'dEQP-VK.spirv_assembly.*'
600        ],
601        'CtsDeqpTestCases.dEQP-VK.ssbo': [
602                '--include-filter', 'CtsDeqpTestCases', '--module',
603                'CtsDeqpTestCases', '--test', 'dEQP-VK.ssbo.*'
604        ],
605        'CtsDeqpTestCases.dEQP-VK.subgroups': [
606                '--include-filter', 'CtsDeqpTestCases', '--module',
607                'CtsDeqpTestCases', '--test', 'dEQP-VK.subgroups.*'
608        ],
609        # Splitting VK.subgroups to smaller pieces to workaround b/138622686.
610        # TODO(kinaba,haddowk): remove them once the root cause is fixed, or
611        # reconsider the sharding strategy.
612        'CtsDeqpTestCases.dEQP-VK.subgroups.b': [
613                '--include-filter', 'CtsDeqpTestCases', '--module',
614                'CtsDeqpTestCases', '--test', 'dEQP-VK.subgroups.b*'
615        ],
616        'CtsDeqpTestCases.dEQP-VK.subgroups.s': [
617                '--include-filter', 'CtsDeqpTestCases', '--module',
618                'CtsDeqpTestCases', '--test', 'dEQP-VK.subgroups.s*'
619        ],
620        'CtsDeqpTestCases.dEQP-VK.subgroups.vote': [
621                '--include-filter', 'CtsDeqpTestCases', '--module',
622                'CtsDeqpTestCases', '--test', 'dEQP-VK.subgroups.vote#*'
623        ],
624        'CtsDeqpTestCases.dEQP-VK.subgroups.arithmetic': [
625                '--include-filter', 'CtsDeqpTestCases', '--module',
626                'CtsDeqpTestCases', '--test', 'dEQP-VK.subgroups.arithmetic#*'
627        ],
628        # TODO(haddowk,kinaba): Hack for b/138622686. Clean up later.
629        'CtsDeqpTestCases.dEQP-VK.subgroups.arithmetic.32': [
630                '--include-filter', 'CtsDeqpTestCases', '--module',
631                'CtsDeqpTestCases', '--test', 'dEQP-VK.subgroups.arithmetic#*',
632                '--abi', 'x86'
633        ],
634        # TODO(haddowk,kinaba): Hack for b/138622686. Clean up later.
635        'CtsDeqpTestCases.dEQP-VK.subgroups.arithmetic.64': [
636                '--include-filter', 'CtsDeqpTestCases', '--module',
637                'CtsDeqpTestCases', '--test', 'dEQP-VK.subgroups.arithmetic#*',
638                '--abi', 'x86_64'
639        ],
640        'CtsDeqpTestCases.dEQP-VK.subgroups.clustered': [
641                '--include-filter', 'CtsDeqpTestCases', '--module',
642                'CtsDeqpTestCases', '--test', 'dEQP-VK.subgroups.clustered#*'
643        ],
644        'CtsDeqpTestCases.dEQP-VK.subgroups.quad': [
645                '--include-filter', 'CtsDeqpTestCases', '--module',
646                'CtsDeqpTestCases', '--test', 'dEQP-VK.subgroups.quad#*'
647        ],
648        'CtsDeqpTestCases.dEQP-VK.synchronization': [
649                '--include-filter', 'CtsDeqpTestCases', '--module',
650                'CtsDeqpTestCases', '--test', 'dEQP-VK.synchronization.*'
651        ],
652        'CtsDeqpTestCases.dEQP-VK.tessellation': [
653                '--include-filter', 'CtsDeqpTestCases', '--module',
654                'CtsDeqpTestCases', '--test', 'dEQP-VK.tessellation.*'
655        ],
656        'CtsDeqpTestCases.dEQP-VK.texture': [
657                '--include-filter', 'CtsDeqpTestCases', '--module',
658                'CtsDeqpTestCases', '--test', 'dEQP-VK.texture.*'
659        ],
660        'CtsDeqpTestCases.dEQP-VK.ubo': [
661                '--include-filter', 'CtsDeqpTestCases', '--module',
662                'CtsDeqpTestCases', '--test', 'dEQP-VK.ubo.*'
663        ],
664        'CtsDeqpTestCases.dEQP-VK.wsi': [
665                '--include-filter', 'CtsDeqpTestCases', '--module',
666                'CtsDeqpTestCases', '--test', 'dEQP-VK.wsi.*'
667        ],
668        'CtsDeqpTestCases.dEQP-VK.ycbcr': [
669                '--include-filter', 'CtsDeqpTestCases', '--module',
670                'CtsDeqpTestCases', '--test', 'dEQP-VK.ycbcr.*'
671        ],
672        'CtsMediaStressTestCases.camera': [
673                '--module',
674                'CtsMediaStressTestCases',
675                '--test',
676                'android.mediastress.cts.MediaRecorderStressTest',
677        ],
678        'CtsMediaTestCases.audio': [
679                '--include-filter',
680                'CtsMediaTestCases android.media.cts.AudioAttributesTest',
681                '--include-filter',
682                'CtsMediaTestCases android.media.cts.AudioEffectTest',
683                '--include-filter',
684                'CtsMediaTestCases android.media.cts.AudioFocusTest',
685                '--include-filter',
686                'CtsMediaTestCases android.media.cts.AudioFormatTest',
687                '--include-filter',
688                'CtsMediaTestCases android.media.cts.AudioManagerTest',
689                '--include-filter',
690                'CtsMediaTestCases android.media.cts.AudioNativeTest',
691                '--include-filter',
692                'CtsMediaTestCases android.media.cts.AudioPlayRoutingNative',
693                '--include-filter',
694                'CtsMediaTestCases android.media.cts.AudioPlaybackConfigurationTest',
695                '--include-filter',
696                'CtsMediaTestCases android.media.cts.AudioPreProcessingTest',
697                '--include-filter',
698                'CtsMediaTestCases android.media.cts.AudioPresentationTest',
699                '--include-filter',
700                'CtsMediaTestCases android.media.cts.AudioRecordAppOpTest',
701                '--include-filter',
702                'CtsMediaTestCases android.media.cts.AudioRecordRoutingNative',
703                '--include-filter',
704                'CtsMediaTestCases android.media.cts.AudioRecordTest',
705                '--include-filter',
706                'CtsMediaTestCases android.media.cts.AudioRecord_BufferSizeTest',
707                '--include-filter',
708                'CtsMediaTestCases android.media.cts.AudioRecordingConfigurationTest',
709                '--include-filter',
710                'CtsMediaTestCases android.media.cts.AudioTrackLatencyTest',
711                '--include-filter',
712                'CtsMediaTestCases android.media.cts.AudioTrackSurroundTest',
713                '--include-filter',
714                'CtsMediaTestCases android.media.cts.AudioTrackTest',
715                '--include-filter',
716                'CtsMediaTestCases android.media.cts.AudioTrack_ListenerTest',
717                '--include-filter',
718                'CtsMediaTestCases android.media.cts.SoundPoolAacTest',
719                '--include-filter',
720                'CtsMediaTestCases android.media.cts.SoundPoolMidiTest',
721                '--include-filter',
722                'CtsMediaTestCases android.media.cts.SoundPoolOggTest',
723                '--include-filter',
724                'CtsMediaTestCases android.media.cts.VolumeShaperTest',
725        ],
726        'CtsPermissionTestCases.camera': [
727                '--include-filter',
728                'CtsPermissionTestCases android.permission.cts.CameraPermissionTest',
729                '--include-filter',
730                'CtsPermissionTestCases android.permission.cts.Camera2PermissionTest',
731        ],
732        _WM_PRESUBMIT: [
733                '--include-filter',
734                'CtsActivityManagerDeviceSdk25TestCases',
735                '--include-filter',
736                'CtsActivityManagerDeviceTestCases',
737                '--include-filter',
738                'CtsAppTestCases android.app.cts.TaskDescriptionTest',
739                '--include-filter',
740                'CtsWindowManagerDeviceTestCases',
741                '--test-arg',
742                ('com.android.compatibility.common.tradefed.testtype.JarHostTest:'
743                 'include-annotation:android.platform.test.annotations.Presubmit'
744                 ),
745                '--test-arg',
746                ('com.android.tradefed.testtype.AndroidJUnitTest:'
747                 'include-annotation:android.platform.test.annotations.Presubmit'
748                 ),
749                '--test-arg',
750                ('com.android.tradefed.testtype.HostTest:'
751                 'include-annotation:android.platform.test.annotations.Presubmit'
752                 ),
753                '--test-arg',
754                ('com.android.tradefed.testtype.AndroidJUnitTest:'
755                 'exclude-annotation:androidx.test.filters.FlakyTest'),
756        ],
757}
758
759CONFIG['EXTRA_ATTRIBUTES'] = {
760    'CtsDeqpTestCases': ['suite:arc-cts', 'suite:arc-cts-deqp'],
761    'CtsDeqpTestCases.dEQP-EGL': [
762        'suite:arc-cts-deqp', 'suite:graphics_per-week'
763    ],
764    'CtsDeqpTestCases.dEQP-GLES2': [
765        'suite:arc-cts-deqp', 'suite:graphics_per-week'
766    ],
767    'CtsDeqpTestCases.dEQP-GLES3': [
768        'suite:arc-cts-deqp', 'suite:graphics_per-week'
769    ],
770    'CtsDeqpTestCases.dEQP-GLES31': [
771        'suite:arc-cts-deqp', 'suite:graphics_per-week'
772    ],
773    'CtsDeqpTestCases.dEQP-VK': [
774        'suite:arc-cts-deqp', 'suite:graphics_per-week'
775    ],
776    _COLLECT: ['suite:arc-cts-qual', 'suite:arc-cts'],
777}
778
779CONFIG['EXTRA_ARTIFACTS'] = {
780    'CtsViewTestCases': ["/storage/emulated/0/SurfaceViewSyncTest/"],
781}
782
783CONFIG['EXTRA_ARTIFACTS_HOST'] = {
784    # For fixing flakiness b/143049967.
785    'CtsThemeHostTestCases': ["/tmp/diff_*.png"],
786}
787
788_PREREQUISITE_BLUETOOTH = 'bluetooth'
789_PREREQUISITE_REGION_US = 'region_us'
790
791CONFIG['PREREQUISITES'] = {
792    'CtsBluetoothTestCases': [_PREREQUISITE_BLUETOOTH],
793    'CtsStatsdHostTestCases': [_PREREQUISITE_BLUETOOTH],
794    'CtsWebkitTestCases': [_PREREQUISITE_REGION_US],
795    'CtsContentTestCases': [_PREREQUISITE_REGION_US],
796    'CtsAppSecurityTestCases': [_PREREQUISITE_REGION_US],
797    'CtsThemeHostTestCases': [_PREREQUISITE_REGION_US],
798}
799
800from generate_controlfiles_common import main
801
802if __name__ == '__main__':
803    main(CONFIG)
804