blob: a73691deb041e925c2910cf6d615e3d396e6c3c4 [file] [log] [blame]
//
// Copyright (C) 2010 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "cts_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
// SPDX-license-identifier-BSD
// SPDX-license-identifier-CC-BY
default_applicable_licenses: ["cts_license"],
}
filegroup {
name: "CtsVerifierMockVrListenerServiceFiles",
srcs: ["src/com/android/cts/verifier/vr/MockVrListenerService.java"],
}
android_test {
name: "CtsVerifier",
defaults: ["cts_error_prone_rules_tests"],
additional_manifests: ["AndroidManifest-common.xml"],
compile_multilib: "both",
srcs: [
"src/**/*.java",
"src/**/I*.aidl",
],
aidl: {
include_dirs: ["frameworks/native/aidl/gui"],
},
static_libs: [
"android-ex-camera2",
"compatibility-common-util-devicesidelib",
"cts-sensors-tests",
"cts-camera-performance-tests",
"ctstestrunner-axt",
"apache-commons-math",
"androidplot",
"ctsverifier-opencv",
"core-tests-support",
"androidx.legacy_legacy-support-v4",
"mockito-target-minus-junit4",
"mockwebserver",
"compatibility-device-util-axt",
"platform-test-annotations",
"cts-security-test-support-library",
"cts-midi-lib",
"cbor-java",
"CtsCameraUtils",
"androidx.legacy_legacy-support-v4",
"CtsForceStopHelper-constants",
"ctsmediautil",
"DpmWrapper"
],
libs: ["telephony-common"] + ["android.test.runner.stubs"] + ["android.test.base.stubs"] + ["android.test.mock.stubs"] + ["android.car"] + ["voip-common"] + ["truth-prebuilt"],
platform_apis: true,
jni_libs: [
"libctsverifier_jni",
"libctsnativemidi_jni",
"libaudioloopback_jni",
"libmegaaudio_jni",
],
optimize: {
proguard_flags_files: ["proguard.flags"],
},
dex_preopt: {
enabled: false,
},
}
// opencv library
java_import {
name: "ctsverifier-opencv",
jars: ["libs/opencv3-android.jar"],
}
// Build CTS verifier framework as a library.
android_library {
name: "cts-verifier-framework",
sdk_version: "current",
min_sdk_version: "29",
resource_dirs: ["res"],
srcs: [
"src/com/android/cts/verifier/*.java",
"src/**/I*.aidl",
],
static_libs: [
"androidx.legacy_legacy-support-v4",
"compatibility-common-util-devicesidelib",
"compatibility-device-util-axt",
],
}
filegroup {
name: "pre_installed_apps",
srcs: [
":CtsEmptyDeviceAdmin",
":CtsEmptyDeviceOwner",
":CtsPermissionApp",
":CtsForceStopHelper",
":NotificationBot",
":CrossProfileTestApp",
":CtsTtsEngineSelectorTestHelper",
":CtsTtsEngineSelectorTestHelper2",
],
}
// Apps to be installed as Instant App using adb install --instant
filegroup {
name: "pre_installed_instant_app",
srcs: [
":CtsVerifierInstantApp",
],
}
filegroup {
name: "other_required_apps",
srcs: [
":CtsVerifierUSBCompanion",
":CtsVpnFirewallAppApi23",
":CtsVpnFirewallAppApi24",
":CtsVpnFirewallAppNotAlwaysOn",
],
}
filegroup {
name: "apps_to_include",
srcs: [
":pre_installed_apps",
":pre_installed_instant_app",
":other_required_apps",
],
}
//
// Creates a "cts-verifier" directory that will contain:
//
// 1. Out directory with a "android-cts-verifier" containing the CTS Verifier
// and other binaries it needs.
//
// 2. Zipped version of the android-cts-verifier directory to be included with
// the build distribution.
//
genrule {
name: "android-cts-verifier",
srcs: [
":apps_to_include",
":CtsVerifier",
":camera-its",
"NOTICE.txt",
],
tools: [
"soong_zip",
"merge_zips",
],
out: ["android-cts-verifier.zip"],
cmd: "echo $(locations :apps_to_include) $(location :CtsVerifier) $(location NOTICE.txt) > $(genDir)/list &&" +
" $(location soong_zip) -o $(genDir)/cts-verifier.zip -j -P android-cts-verifier -l $(genDir)/list &&" +
" $(location merge_zips) $(out) $(genDir)/cts-verifier.zip $(location :camera-its)",
dists: [
{
targets: ["cts"],
},
],
}
filegroup {
name: "android-cts-verifier-for-make",
srcs: [":android-cts-verifier"],
export_to_make_var: "SOONG_ANDROID_CTS_VERIFIER_ZIP",
}