• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2010 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    // See: http://go/android-license-faq
19    default_applicable_licenses: [
20        "cts_apps_CtsVerifier_opencv_license",
21        "Android-Apache-2.0",
22        "cts_apps_CtsVerifier_fatcow_license",
23    ],
24}
25
26license {
27    name: "cts_apps_CtsVerifier_opencv_license",
28    package_name: "opencv",
29    license_kinds: [
30        "SPDX-license-identifier-BSD",
31    ],
32    license_text: [
33        "libs/opencv-android_LICENSE",
34        "res/raw/opencv_library_license",
35    ],
36}
37
38// See: src/com/android/cts/verifier/features/FeatureSummaryActivity.java
39license {
40    name: "cts_apps_CtsVerifier_fatcow_license",
41    package_name: "fatcow icons",
42    license_kinds: [
43        "SPDX-license-identifier-CC-BY-3.0",
44    ],
45    license_text: ["LICENSE_CC_BY"],
46}
47
48filegroup {
49    name: "CtsVerifierMockVrListenerServiceFiles",
50    srcs: ["src/com/android/cts/verifier/vr/MockVrListenerService.java"],
51}
52
53android_library {
54    name: "CtsVerifierLibT",
55    defaults: ["cts_error_prone_rules_tests"],
56
57    srcs: [
58        "src/**/*.java",
59        "src/**/*.kt",
60        "src/**/I*.aidl",
61    ],
62    exclude_srcs: [
63        "src/com/android/cts/verifier/camera/its/*",
64    ],
65
66    aidl: {
67        include_dirs: ["frameworks/native/aidl/gui"],
68    },
69
70    static_libs: [
71        "android.media.audio-aconfig-java",
72        "android.service.chooser.flags-aconfig-java",
73        "android-ex-camera2",
74        "compatibility-common-util-devicesidelib",
75        "cts-sensors-tests",
76        "cts-camera-performance-tests",
77        "ctstestrunner-axt",
78        "apache-commons-math",
79        "androidplot",
80        "ctsverifier-opencv",
81        "core-tests-support",
82        "androidx.appcompat_appcompat",
83        "androidx.fragment_fragment",
84        "androidx.media3.media3-common",
85        "androidx.media3.media3-exoplayer",
86        "androidx.media3.media3-ui",
87        "androidx.preference_preference",
88        "mockito-target-minus-junit4",
89        "mockwebserver",
90        "compatibility-device-util-axt",
91        "platform-test-annotations",
92        "cts-security-test-support-library",
93        "cts-midi-lib",
94        "cbor-java",
95        "CtsCameraUtils",
96        "androidx.legacy_legacy-support-v4",
97        "CtsForceStopHelper-constants",
98        "ctsmediautil",
99        "DpmWrapper",
100        "MediaPerformanceClassCommon",
101        "mediapc-requirements",
102        "mediaprovider_flags_java_lib",
103        "com_android_wm_shell_flags_lib",
104        "its-service",
105    ],
106
107    libs: [
108        "telephony-common",
109        "android.test.runner.stubs",
110        "android.test.base.stubs",
111        "android.test.mock.stubs",
112        "android.car-test-stubs",
113        "voip-common",
114        "truth",
115    ],
116
117    platform_apis: true,
118
119    optimize: {
120        proguard_flags_files: ["proguard.flags"],
121    },
122
123    dex_preopt: {
124        enabled: false,
125    },
126}
127
128android_test {
129    name: "CtsVerifier",
130    static_libs: [
131        "CtsVerifierLibT",
132    ],
133
134    compile_multilib: "both",
135
136    additional_manifests: ["AndroidManifest-verifierConfig.xml"],
137
138    jni_libs: [
139        "libctsverifier_jni",
140        "libctsnativemidi_jni",
141        "libaudioloopback_jni",
142        "libmegaaudio_jni",
143    ],
144}
145
146// opencv library
147java_import {
148    name: "ctsverifier-opencv",
149    jars: ["libs/opencv3-android.jar"],
150}
151
152// Build CTS verifier framework as a library.
153android_library {
154    name: "cts-verifier-framework",
155
156    sdk_version: "test_current",
157    min_sdk_version: "29",
158    resource_dirs: ["res"],
159    srcs: [
160        "src/com/android/cts/verifier/*.java",
161        "src/**/I*.aidl",
162    ],
163    static_libs: [
164        "androidx.legacy_legacy-support-v4",
165        "compatibility-common-util-devicesidelib",
166        "compatibility-device-util-axt",
167    ],
168}
169
170// Build ItsService as a library
171android_library {
172    name: "its-service",
173
174    sdk_version: "test_current",
175    resource_dirs: ["res"],
176    srcs: [
177        "src/com/android/cts/verifier/camera/its/*.java",
178        "src/com/android/cts/verifier/camera/performance/*.java",
179    ],
180
181    static_libs: [
182        "android-ex-camera2",
183        "cts-camera-performance-tests",
184        "cts-verifier-framework",
185        "ctstestrunner-axt",
186        "androidx.appcompat_appcompat",
187        "CtsCameraUtils",
188        "MediaPerformanceClassCommon",
189        "mediapc-requirements",
190    ],
191}
192
193filegroup {
194    name: "pre_installed_apps",
195    device_first_srcs: [
196        ":CtsDefaultNotesApp",
197        ":CtsDeviceControlsApp",
198        ":CtsEmptyDeviceAdmin",
199        ":CtsEmptyDeviceOwner",
200        ":CtsPermissionApp",
201        ":CtsForceStopHelper",
202        ":NotificationBot",
203        ":CrossProfileTestApp",
204        ":CtsTtsEngineSelectorTestHelper",
205        ":CtsTtsEngineSelectorTestHelper2",
206    ],
207}
208
209// Apps to be installed as Instant App using adb install --instant
210filegroup {
211    name: "pre_installed_instant_app",
212    device_first_srcs: [
213        ":CtsVerifierInstantApp",
214    ],
215}
216
217filegroup {
218    name: "other_required_apps",
219    device_first_srcs: [
220        ":CameraFeatureCombinationVerifier",
221        ":CtsCarWatchdogCompanionApp",
222        ":CtsTileServiceApp",
223        ":CtsVerifierUSBCompanion",
224        ":CtsVpnFirewallAppApi23",
225        ":CtsVpnFirewallAppApi24",
226        ":CtsVpnFirewallAppNotAlwaysOn",
227        ":jetpack-camera-app",
228    ],
229}
230
231filegroup {
232    name: "cts_apps_to_include",
233    srcs: [
234        ":pre_installed_apps",
235        ":pre_installed_instant_app",
236        ":other_required_apps",
237    ],
238}
239
240//
241// Creates a "cts-verifier" directory that will contain:
242//
243// 1. Out directory with a "android-cts-verifier" containing the CTS Verifier
244//    and other binaries it needs.
245//
246// 2. Zipped version of the android-cts-verifier directory to be included with
247//    the build distribution.
248//
249genrule {
250    name: "android-cts-verifier",
251    srcs: [
252        ":cts_apps_to_include",
253        ":camera-its",
254        ":camera-webcam-test",
255    ],
256    device_common_srcs: [
257        ":android-cts-verifier-notice",
258        ":CtsVerifier",
259    ],
260    tools: [
261        "soong_zip",
262        "merge_zips",
263    ],
264    out: ["android-cts-verifier.zip"],
265    cmd: "echo $(locations :cts_apps_to_include) $(location :CtsVerifier) $(location :android-cts-verifier-notice) > $(genDir)/list &&" +
266        " $(location soong_zip) -o $(genDir)/cts-verifier.zip -j -P android-cts-verifier -l $(genDir)/list &&" +
267        " $(location merge_zips) $(out) $(genDir)/cts-verifier.zip $(location :camera-its) $(location :camera-webcam-test)",
268}
269
270gen_notice {
271    name: "android-cts-verifier-notice",
272    for: ["android-cts-verifier"],
273    stem: "NOTICE",
274    suffix: ".txt",
275}
276
277filegroup {
278    name: "android-cts-verifier-for-make",
279    srcs: [":android-cts-verifier"],
280    export_to_make_var: "SOONG_ANDROID_CTS_VERIFIER_ZIP",
281}
282
283genrule {
284    name: "android-cts-verifier-app-list",
285    srcs: [
286        ":cts_apps_to_include",
287    ],
288    device_common_srcs: [
289        ":CtsVerifier",
290    ],
291    out: ["android-cts-verifier-app-list.txt"],
292    cmd: "echo $(locations :cts_apps_to_include) $(location :CtsVerifier) > $(out)",
293}
294
295filegroup {
296    name: "android-cts-verifier-app-list-for-make",
297    srcs: [":android-cts-verifier-app-list"],
298    export_to_make_var: "SOONG_ANDROID_CTS_VERIFIER_APP_LIST",
299}
300