• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
8from generate_controlfiles_common import main
9
10
11_ALL = 'all'
12
13CONFIG = {}
14
15CONFIG['TEST_NAME'] = 'cheets_CTS_Instant'
16CONFIG['DOC_TITLE'] = \
17    'Android Compatibility Test Suite for Instant Apps (CTS Instant)'
18CONFIG['MOBLAB_SUITE_NAME'] = 'suite:cts_P, suite:cts'
19CONFIG['COPYRIGHT_YEAR'] = 2018
20CONFIG['AUTHKEY'] = ''
21
22CONFIG['LARGE_MAX_RESULT_SIZE'] = 1000 * 1024
23CONFIG['NORMAL_MAX_RESULT_SIZE'] = 500 * 1024
24
25CONFIG['TRADEFED_CTS_COMMAND'] = 'cts-instant'
26CONFIG['TRADEFED_RETRY_COMMAND'] = 'retry'
27CONFIG['TRADEFED_DISABLE_REBOOT'] = False
28CONFIG['TRADEFED_DISABLE_REBOOT_ON_COLLECTION'] = True
29CONFIG['TRADEFED_MAY_SKIP_DEVICE_INFO'] = False
30CONFIG['TRADEFED_EXECUTABLE_PATH'] = \
31    'android-cts_instant/tools/cts-instant-tradefed'
32CONFIG['TRADEFED_IGNORE_BUSINESS_LOGIC_FAILURE'] = False
33
34CONFIG['INTERNAL_SUITE_NAMES'] = ['suite:arc-cts']
35CONFIG['QUAL_SUITE_NAMES'] = ['suite:arc-cts-qual']
36
37# CTS Instant is relatively small (= shorter turnaround time), and very
38# unlikely to fail alone (= regression almost always caught by the
39# corresponding CTS module.) For now we don't generate this type of control
40# files.
41CONFIG['CONTROLFILE_TEST_FUNCTION_NAME'] = 'run_TS'
42CONFIG['CONTROLFILE_WRITE_SIMPLE_QUAL_AND_REGRESS'] = True
43CONFIG['CONTROLFILE_WRITE_CAMERA'] = False
44CONFIG['CONTROLFILE_WRITE_EXTRA'] = False
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# Unlike regular CTS we have to target the native ABI only.
53CONFIG['LAB_DEPENDENCY'] = {
54    'x86': ['cts_cpu_x86'],
55    'arm': ['cts_cpu_arm']
56}
57
58CONFIG['CTS_JOB_RETRIES_IN_PUBLIC'] = 1
59CONFIG['CTS_QUAL_RETRIES'] = 9
60CONFIG['CTS_MAX_RETRIES'] = {}
61
62# TODO(ihf): Update timeouts once P is more stable.
63# Timeout in hours.
64CONFIG['CTS_TIMEOUT_DEFAULT'] = 1.0
65CONFIG['CTS_TIMEOUT'] = {
66    _ALL: 5.0,
67    _COLLECT: 2.0,
68    _PUBLIC_COLLECT: 2.0,
69    'CtsFileSystemTestCases': 2.5,
70}
71
72# Any test that runs as part as blocking BVT needs to be stable and fast. For
73# this reason we enforce a tight timeout on these modules/jobs.
74# Timeout in hours. (0.1h = 6 minutes)
75CONFIG['BVT_TIMEOUT'] = 0.1
76
77CONFIG['QUAL_TIMEOUT'] = 5
78
79# Split tests so that large and flaky tests are distributed evenly.
80CONFIG['QUAL_BOOKMARKS'] = [
81        'A',  # A bookend to simplify partition algorithm.
82        # CtsAccessibility, CtsAutoFill
83        'CtsBackgroundRestrictionsTestCases',
84        # CtsMedia, CtsPrint
85        'CtsSampleDeviceTestCases',
86        # CtsView, CtsWidget
87        'zzzzz'  # A bookend to simplify algorithm.
88]
89
90CONFIG['SMOKE'] = [
91    # TODO(b/113641546): add to CQ/PFQ when it's ready.
92    # 'CtsAccountManagerTestCases',
93]
94
95CONFIG['BVT_ARC'] = [
96    # TODO(b/113641546): add to CQ/PFQ when it's ready.
97    # 'CtsPermission2TestCases',
98]
99
100CONFIG['BVT_PERBUILD'] = [
101    'CtsAccountManagerTestCases',
102    'CtsPermission2TestCases',
103    'CtsUiAutomationTestCases',
104    'CtsUsbTests',
105]
106
107CONFIG['NEEDS_POWER_CYCLE'] = [
108]
109
110CONFIG['HARDWARE_DEPENDENT_MODULES'] = [
111]
112
113# The suite is divided based on the run-time hint in the *.config file.
114CONFIG['VMTEST_INFO_SUITES'] = collections.OrderedDict()
115
116# Modules that are known to download and/or push media file assets.
117CONFIG['MEDIA_MODULES'] = []
118CONFIG['NEEDS_PUSH_MEDIA'] = []
119
120CONFIG['ENABLE_DEFAULT_APPS'] = []
121
122# Run `eject` for (and only for) each device with RM=1 in lsblk output.
123_EJECT_REMOVABLE_DISK_COMMAND = (
124    "\'lsblk -do NAME,RM | sed -n s/1$//p | xargs -n1 eject\'")
125
126# Preconditions applicable to public and internal tests.
127CONFIG['PRECONDITION'] = {}
128CONFIG['LOGIN_PRECONDITION'] = {
129    'CtsAppSecurityHostTestCases': [_EJECT_REMOVABLE_DISK_COMMAND],
130    'CtsJobSchedulerTestCases': [_EJECT_REMOVABLE_DISK_COMMAND],
131    'CtsOsTestCases': [_EJECT_REMOVABLE_DISK_COMMAND],
132    'CtsProviderTestCases': [_EJECT_REMOVABLE_DISK_COMMAND],
133    _ALL: [_EJECT_REMOVABLE_DISK_COMMAND],
134}
135
136# Preconditions applicable to public tests.
137CONFIG['PUBLIC_PRECONDITION'] = {}
138
139CONFIG['PUBLIC_DEPENDENCIES'] = {
140    'CtsCameraTestCases': ['lighting'],
141    'CtsMediaTestCases': ['noloopback'],
142}
143
144# This information is changed based on regular analysis of the failure rate on
145# partner moblabs.
146CONFIG['PUBLIC_MODULE_RETRY_COUNT'] = {
147    'CtsNetTestCases': 10,
148    'CtsSecurityHostTestCases': 10,
149    'CtsUsageStatsTestCases': 10,
150    'CtsFileSystemTestCases': 10,
151    'CtsBluetoothTestCases': 10,
152    _PUBLIC_COLLECT: 0,
153}
154
155CONFIG['PUBLIC_OVERRIDE_TEST_PRIORITY'] = {
156    _PUBLIC_COLLECT: 70,
157}
158
159# This information is changed based on regular analysis of the job run time on
160# partner moblabs.
161
162CONFIG['OVERRIDE_TEST_LENGTH'] = {
163    'CtsDeqpTestCases': 4,  # LONG
164    'CtsMediaTestCases': 4,
165    'CtsMediaStressTestCases': 4,
166    'CtsSecurityTestCases': 4,
167    'CtsCameraTestCases': 4,
168    _ALL: 4,
169    # Even though collect tests doesn't run very long, it must be the very first
170    # job executed inside of the suite. Hence it is the only 'LENGTHY' test.
171    _COLLECT: 5,  # LENGTHY
172}
173
174CONFIG['DISABLE_LOGCAT_ON_FAILURE'] = set()
175CONFIG['EXTRA_MODULES'] = {}
176CONFIG['PUBLIC_EXTRA_MODULES'] = {}
177CONFIG['EXTRA_SUBMODULE_OVERRIDE'] = {}
178
179CONFIG['EXTRA_COMMANDLINE'] = {}
180
181CONFIG['EXTRA_ATTRIBUTES'] = {
182    'tradefed-run-collect-tests-only-internal': ['suite:arc-cts'],
183}
184
185CONFIG['EXTRA_ARTIFACTS'] = {}
186
187CONFIG['PREREQUISITES'] = {}
188
189if __name__ == '__main__':
190    main(CONFIG)
191