xref: /aosp_15_r20/cts/tests/app/Android.bp (revision b7c941bb3fa97aba169d73cee0bed2de8ac964bf)
1// Copyright (C) 2008 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17    default_team: "trendy_team_framework_backstage_power",
18}
19
20android_test {
21    name: "CtsAppTestCases",
22    defaults: ["cts_defaults"],
23    libs: [
24        "android.test.runner.stubs.test",
25        "org.apache.http.legacy.stubs.test",
26        "android.test.base.stubs.test",
27    ],
28    static_libs: [
29        "compatibility-device-util-axt",
30        "ctstestrunner-axt",
31        "ctstestserver",
32        "cts-wm-util",
33        "mockito-target-minus-junit4",
34        "androidx.test.ext.junit",
35        "androidx.test.rules",
36        "platform-test-annotations",
37        "platformprotosnano",
38        "permission-test-util-lib",
39        "CtsAppTestStubsShared",
40        "android.content.pm.flags-aconfig-java",
41        "android.multiuser.flags-aconfig-java",
42        "flag-junit",
43        "com.android.media.flags.bettertogether-aconfig-java",
44        "android.app.flags-aconfig-java",
45        "ravenwood-junit",
46        "bedstead",
47    ],
48    srcs: [
49        "src/**/*.java",
50        "src/**/*.kt",
51    ],
52    // Tag this module as a cts test artifact
53    test_suites: [
54        "cts",
55        "general-tests",
56        "sts",
57    ],
58    instrumentation_for: "CtsAppTestStubs",
59    sdk_version: "test_current",
60    // 29 required for Harrier.
61    min_sdk_version: "29",
62    // Disable coverage since it pushes us over the dex limit and we don't
63    // actually need to measure the tests themselves.
64    jacoco: {
65        exclude_filter: ["**"],
66    },
67    // Even with coverage disabled, we're close to the single dex limit, so allow use of multi-dex.
68    dxflags: ["--multi-dex"],
69    data: [
70        ":CtsSimpleApp",
71        ":CtsAppTestDelayedStart",
72        ":CtsAppTestStubs",
73        ":CtsAppTestStubsApp1",
74        ":CtsAppTestStubsApp3",
75        ":CtsAppTestStubsApp2",
76        ":CtsAppTestStubsApi30",
77        ":CtsAppTestStubsApi34",
78        ":CtsAppTestWedgedStart",
79        ":CtsBadProviderStubs",
80        ":CtsCantSaveState1",
81        ":CtsCantSaveState2",
82        ":StorageDelegator",
83        ":CtsActivityManagerApi29",
84        ":WallpaperTest",
85        ":CtsAppTestProviderApp",
86    ],
87    per_testcase_directory: true,
88}
89
90android_ravenwood_test {
91    name: "CtsAppTestCasesRavenwood",
92    static_libs: [
93        "androidx.annotation_annotation",
94        "androidx.test.rules",
95        "compatibility-device-util-axt-ravenwood",
96    ],
97    srcs: [
98        "src/android/app/cts/ActivityOptionsTest.java",
99        "src/android/app/cts/BroadcastOptionsTest.java",
100    ],
101    auto_gen_config: true,
102}
103
104android_test {
105    name: "CtsDownloadManagerApi28",
106    defaults: ["cts_defaults"],
107    libs: [
108        "android.test.runner.stubs.test",
109        "org.apache.http.legacy.stubs.test",
110        "android.test.base.stubs.test",
111    ],
112    static_libs: [
113        "compatibility-device-util-axt",
114        "ctstestrunner-axt",
115        "ctstestserver",
116        "mockito-target-minus-junit4",
117        "androidx.test.rules",
118        "platform-test-annotations",
119    ],
120    srcs: [
121        "DownloadManagerApi28Test/src/**/*.java",
122        "src/android/app/cts/DownloadManagerTestBase.java",
123    ],
124    resource_dirs: ["app/res"],
125    asset_dirs: ["app/assets"],
126    // Tag this module as a cts test artifact
127    test_suites: [
128        "cts",
129        "general-tests",
130    ],
131    sdk_version: "test_current",
132    min_sdk_version: "21",
133    manifest: "DownloadManagerApi28Test/AndroidManifest.xml",
134    test_config: "DownloadManagerApi28Test/AndroidTest.xml",
135    lint: {
136        baseline_filename: "lint-baseline.xml",
137    },
138}
139
140android_test {
141    name: "CtsDownloadManagerInstaller",
142    defaults: ["cts_defaults"],
143    libs: [
144        "android.test.runner.stubs.test",
145        "org.apache.http.legacy.stubs.test",
146        "android.test.base.stubs.test",
147    ],
148    static_libs: [
149        "compatibility-device-util-axt",
150        "ctstestrunner-axt",
151        "ctstestserver",
152        "mockito-target-minus-junit4",
153        "androidx.test.rules",
154        "platform-test-annotations",
155    ],
156    srcs: [
157        "DownloadManagerInstallerTest/src/**/*.java",
158        "src/android/app/cts/DownloadManagerTestBase.java",
159    ],
160    resource_dirs: ["app/res"],
161    asset_dirs: ["app/assets"],
162    // Tag this module as a cts test artifact
163    test_suites: [
164        "cts",
165        "general-tests",
166    ],
167    sdk_version: "test_current",
168    min_sdk_version: "21",
169    manifest: "DownloadManagerInstallerTest/AndroidManifest.xml",
170    test_config: "DownloadManagerInstallerTest/AndroidTest.xml",
171    lint: {
172        baseline_filename: "lint-baseline.xml",
173    },
174}
175
176android_test {
177    name: "CtsAppStartTestCases",
178    team: "trendy_team_system_performance",
179    defaults: ["cts_defaults"],
180    libs: [
181        "android.test.runner.stubs.system",
182        "org.apache.http.legacy.stubs.system",
183        "android.test.base.stubs.system",
184    ],
185    static_libs: [
186        "androidx.test.uiautomator_uiautomator",
187        "androidx.test.rules",
188        "compatibility-device-util-axt",
189        "CtsExternalServiceCommon",
190        "cts-wm-util",
191        "libprotobuf-java-lite",
192    ],
193    aidl: {
194        local_include_dirs: ["app/src"],
195    },
196    srcs: [
197        "AppStartTest/src/**/*.java",
198        "app/src/**/*.aidl",
199    ],
200    test_suites: [
201        "cts",
202        "general-tests",
203    ],
204    manifest: "AppStartTest/AndroidManifest.xml",
205    test_config: "AppStartTest/AndroidTest.xml",
206    platform_apis: true,
207    data: [
208        ":CtsAppStartInfoApp",
209        ":CtsExternalServiceService",
210        ":CtsAppTestStubs",
211    ],
212    per_testcase_directory: true,
213}
214
215android_test {
216    name: "CtsAppExitTestCases",
217    team: "trendy_team_framework_backstage_power",
218    defaults: ["cts_defaults"],
219    libs: [
220        "android.test.runner.stubs.system",
221        "org.apache.http.legacy.stubs.system",
222        "android.test.base.stubs.system",
223    ],
224    static_libs: [
225        "androidx.test.uiautomator_uiautomator",
226        "androidx.test.rules",
227        "compatibility-device-util-axt",
228        "CtsExternalServiceCommon",
229        "cts-wm-util",
230        "libprotobuf-java-lite",
231    ],
232    aidl: {
233        local_include_dirs: ["app/src"],
234    },
235    srcs: [
236        ":libtombstone_proto-src",
237        "AppExitTest/src/**/*.java",
238        "app/src/**/*.aidl",
239        "src/android/app/cts/android/app/cts/tools/WatchUidRunner.java",
240    ],
241    jarjar_rules: "AppExitTest/jarjar-rules.txt",
242    test_suites: [
243        "cts",
244        "general-tests",
245    ],
246    manifest: "AppExitTest/AndroidManifest.xml",
247    test_config: "AppExitTest/AndroidTest.xml",
248    platform_apis: true,
249    data: [
250        ":CtsSimpleApp",
251        ":CtsExternalServiceService",
252        ":CtsAppTestStubs",
253    ],
254    per_testcase_directory: true,
255}
256
257android_test {
258    name: "CtsAppFgsTestCases",
259    team: "trendy_team_framework_backstage_power",
260    defaults: ["cts_defaults"],
261    libs: [
262        "android.test.runner.stubs.system",
263        "org.apache.http.legacy.stubs.system",
264        "android.test.base.stubs.system",
265    ],
266    static_libs: [
267        "androidx.test.uiautomator_uiautomator",
268        "androidx.test.rules",
269        "compatibility-device-util-axt",
270        "CtsExternalServiceCommon",
271        "cts-wm-util",
272        "libprotobuf-java-lite",
273        "flag-junit",
274        "android.content.pm.flags-aconfig-java",
275        "com.android.media.flags.bettertogether-aconfig-java",
276    ],
277    aidl: {
278        local_include_dirs: ["app/src"],
279    },
280    srcs: [
281        "FgsTest/src/**/*.java",
282        "app/src/**/*.aidl",
283        "app/src/android/app/stubs/ScreenOnActivity.java",
284        "src/android/app/cts/android/app/cts/tools/WatchUidRunner.java",
285        "FgsTestHelper/src/android/app/fgstesthelper/LocalForegroundServiceBase.java",
286    ],
287    test_suites: [
288        "cts",
289        "general-tests",
290    ],
291    instrumentation_for: "CtsAppTestFgsTestHelper",
292    manifest: "FgsTest/AndroidManifest.xml",
293    test_config: "FgsTest/AndroidTest.xml",
294    platform_apis: true,
295    data: [
296        ":CtsAppTestFgsTestHelper",
297        ":CtsAppTestFgsTestHelperCurrent",
298        ":CtsAppTestFgsTestHelperApi33",
299    ],
300    per_testcase_directory: true,
301}
302
303test_module_config {
304    name: "CtsAppTestCases_android_server_am_Presubmit",
305    base: "CtsAppTestCases",
306    test_suites: ["general-tests"],
307    include_filters: [
308        "android.app.cts.ActivityManagerProcessStateTest",
309        "android.app.cts.ServiceTest",
310        "android.app.cts.ActivityManagerTest",
311        "android.app.cts.ActivityManagerFgsBgStartTest",
312        "android.app.cts.TaskDescriptionTest",
313    ],
314    include_annotations: ["android.platform.test.annotations.Presubmit"],
315    exclude_annotations: ["androidx.test.filters.LargeTest"],
316}
317
318test_module_config {
319    name: "CtsAppTestCases_android_server_am",
320    base: "CtsAppTestCases",
321    test_suites: ["general-tests"],
322    include_filters: [
323        "android.app.cts.ActivityManagerProcessStateTest",
324        "android.app.cts.ServiceTest",
325        "android.app.cts.ActivityManagerTest",
326        "android.app.cts.ActivityManagerFgsBgStartTest",
327        "android.app.cts.TaskDescriptionTest",
328    ],
329}
330
331test_module_config {
332    name: "CtsAppTestCases_cts_activitymanagerapi29test",
333    base: "CtsAppTestCases",
334    test_suites: ["general-tests"],
335    include_filters: ["android.app.cts.ActivityManagerApi29Test"],
336}
337
338test_module_config {
339    name: "CtsAppTestCases_cts_requesttileserviceaddtest",
340    base: "CtsAppTestCases",
341    test_suites: ["general-tests"],
342    include_filters: ["android.app.cts.RequestTileServiceAddTest"],
343}
344
345test_module_config {
346    name: "CtsAppTestCases_cts_toolbaractionbartest",
347    base: "CtsAppTestCases",
348    test_suites: ["general-tests"],
349    include_filters: ["android.app.cts.ToolbarActionBarTest"],
350}
351
352test_module_config {
353    name: "CtsAppTestCases_cts_downloadmanagertest",
354    base: "CtsAppTestCases",
355    test_suites: ["general-tests"],
356    include_filters: ["android.app.cts.DownloadManagerTest"],
357}
358
359test_module_config {
360    name: "CtsAppTestCases_all-except-large",
361    base: "CtsAppTestCases",
362    test_suites: ["general-tests"],
363    exclude_filters: ["android.app.cts.ActivityManagerProcessStateTest"],
364    exclude_annotations: ["androidx.test.filters.LargeTest"],
365}
366
367test_module_config {
368    name: "CtsAppTestCases_activitymanagerprocessstatetest",
369    base: "CtsAppTestCases",
370    test_suites: ["general-tests"],
371    include_filters: ["android.app.cts.ActivityManagerProcessStateTest"],
372    exclude_annotations: ["androidx.test.filters.LargeTest"],
373}
374
375test_module_config {
376    name: "CtsAppFgsTestCases_pm_Presubmit",
377    base: "CtsAppFgsTestCases",
378    test_suites: ["general-tests"],
379    include_annotations: ["android.platform.test.annotations.Presubmit"],
380    exclude_annotations: ["androidx.test.filters.LargeTest"],
381}
382