• 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/**/I*.aidl",
60    ],
61
62    aidl: {
63        include_dirs: ["frameworks/native/aidl/gui"],
64    },
65
66    static_libs: [
67        "android-ex-camera2",
68        "compatibility-common-util-devicesidelib",
69        "cts-sensors-tests",
70        "cts-camera-performance-tests",
71        "ctstestrunner-axt",
72        "apache-commons-math",
73        "androidplot",
74        "ctsverifier-opencv",
75        "core-tests-support",
76        "androidx.legacy_legacy-support-v4",
77        "mockito-target-minus-junit4",
78        "mockwebserver",
79        "compatibility-device-util-axt",
80        "platform-test-annotations",
81        "cts-security-test-support-library",
82        "cts-midi-lib",
83        "cbor-java",
84        "CtsCameraUtils",
85        "androidx.legacy_legacy-support-v4",
86        "CtsForceStopHelper-constants",
87        "ctsmediautil",
88        "DpmWrapper",
89        "MediaPerformanceClassCommon",
90    ],
91
92    libs: [
93        "telephony-common",
94        "android.test.runner.stubs",
95        "android.test.base.stubs",
96        "android.test.mock.stubs",
97        "android.car-test-stubs",
98        "voip-common",
99        "truth",
100    ],
101
102    platform_apis: true,
103
104    optimize: {
105        proguard_flags_files: ["proguard.flags"],
106    },
107
108    dex_preopt: {
109        enabled: false,
110    },
111}
112
113android_test {
114    name: "CtsVerifier",
115    static_libs: [
116        "CtsVerifierLibT",
117    ],
118
119    compile_multilib: "both",
120
121    additional_manifests: ["AndroidManifest-verifierConfig.xml"],
122
123    jni_libs: [
124        "libctsverifier_jni",
125        "libctsnativemidi_jni",
126        "libaudioloopback_jni",
127        "libmegaaudio_jni",
128    ],
129}
130
131// opencv library
132java_import {
133    name: "ctsverifier-opencv",
134    jars: ["libs/opencv3-android.jar"],
135}
136
137// Build CTS verifier framework as a library.
138android_library {
139    name: "cts-verifier-framework",
140
141    sdk_version: "test_current",
142    min_sdk_version: "29",
143    resource_dirs: ["res"],
144    srcs: [
145        "src/com/android/cts/verifier/*.java",
146        "src/**/I*.aidl",
147    ],
148
149    static_libs: [
150        "androidx.legacy_legacy-support-v4",
151        "compatibility-common-util-devicesidelib",
152        "compatibility-device-util-axt",
153    ],
154
155}
156
157filegroup {
158    name: "pre_installed_apps",
159    srcs: [
160        ":CtsDefaultNotesApp",
161        ":CtsDeviceControlsApp",
162        ":CtsEmptyDeviceAdmin",
163        ":CtsEmptyDeviceOwner",
164        ":CtsPermissionApp",
165        ":CtsForceStopHelper",
166        ":NotificationBot",
167        ":CrossProfileTestApp",
168        ":CtsTtsEngineSelectorTestHelper",
169        ":CtsTtsEngineSelectorTestHelper2",
170    ],
171}
172
173// Apps to be installed as Instant App using adb install --instant
174filegroup {
175    name: "pre_installed_instant_app",
176    srcs: [
177        ":CtsVerifierInstantApp",
178    ],
179}
180
181filegroup {
182    name: "other_required_apps",
183    srcs: [
184        ":CtsCarWatchdogCompanionApp",
185        ":CtsTileServiceApp",
186        ":CtsVerifierUSBCompanion",
187        ":CtsVpnFirewallAppApi23",
188        ":CtsVpnFirewallAppApi24",
189        ":CtsVpnFirewallAppNotAlwaysOn",
190    ],
191}
192
193filegroup {
194    name: "cts_apps_to_include",
195    srcs: [
196        ":pre_installed_apps",
197        ":pre_installed_instant_app",
198        ":other_required_apps",
199    ],
200}
201
202//
203// Creates a "cts-verifier" directory that will contain:
204//
205// 1. Out directory with a "android-cts-verifier" containing the CTS Verifier
206//    and other binaries it needs.
207//
208// 2. Zipped version of the android-cts-verifier directory to be included with
209//    the build distribution.
210//
211genrule {
212    name: "android-cts-verifier",
213    srcs: [
214        ":android-cts-verifier-notice",
215        ":cts_apps_to_include",
216        ":CtsVerifier",
217        ":camera-its",
218        ":camera-webcam-test",
219    ],
220    tools: [
221        "soong_zip",
222        "merge_zips",
223    ],
224    out: ["android-cts-verifier.zip"],
225    cmd: "echo $(locations :cts_apps_to_include) $(location :CtsVerifier) $(location :android-cts-verifier-notice) > $(genDir)/list &&" +
226        " $(location soong_zip) -o $(genDir)/cts-verifier.zip -j -P android-cts-verifier -l $(genDir)/list &&" +
227        " $(location merge_zips) $(out) $(genDir)/cts-verifier.zip $(location :camera-its) $(location :camera-webcam-test)",
228    dists: [
229        {
230            targets: ["cts"],
231        },
232    ],
233}
234
235gen_notice {
236    name: "android-cts-verifier-notice",
237    for: ["android-cts-verifier"],
238    stem: "NOTICE",
239    suffix: ".txt",
240}
241
242filegroup {
243    name: "android-cts-verifier-for-make",
244    srcs: [":android-cts-verifier"],
245    export_to_make_var: "SOONG_ANDROID_CTS_VERIFIER_ZIP",
246}
247