blob: f5b1285797c5ba9e710d3c777778ccacd1bbf9b7 [file]
//
// 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
default_applicable_licenses: [
"cts_apps_CtsVerifier_opencv_license",
"Android-Apache-2.0",
"cts_apps_CtsVerifier_fatcow_license",
],
default_team: "trendy_team_partner_eng",
}
license {
name: "cts_apps_CtsVerifier_opencv_license",
package_name: "opencv",
license_kinds: [
"SPDX-license-identifier-BSD",
],
license_text: [
"libs/opencv-android_LICENSE",
"res/raw/opencv_library_license",
],
}
// See: src/com/android/cts/verifier/features/FeatureSummaryActivity.java
license {
name: "cts_apps_CtsVerifier_fatcow_license",
package_name: "fatcow icons",
license_kinds: [
"SPDX-license-identifier-CC-BY-3.0",
],
license_text: ["LICENSE_CC_BY"],
}
filegroup {
name: "CtsVerifierMockVrListenerServiceFiles",
srcs: ["src/com/android/cts/verifier/vr/MockVrListenerService.java"],
}
android_library {
name: "CtsVerifierLibT",
defaults: ["cts_error_prone_rules_tests"],
srcs: [
"src/**/*.java",
"src/**/*.kt",
"src/**/I*.aidl",
],
exclude_srcs: [
"src/com/android/cts/verifier/camera/its/*",
],
aidl: {
include_dirs: ["frameworks/native/aidl/gui"],
},
static_libs: [
"android.app.flags-aconfig-java",
"android.media.audio-aconfig-java",
"android.service.chooser.flags-aconfig-java",
"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.appcompat_appcompat",
"androidx.fragment_fragment",
"androidx.media3.media3-common",
"androidx.media3.media3-exoplayer",
"androidx.media3.media3-exoplayer-dash",
"androidx.media3.media3-ui",
"androidx.preference_preference",
"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",
"MediaPerformanceClassCommon",
"mediapc-requirements",
"com_android_wm_shell_flags_lib",
"its-service",
"cts-verifier-usb-common",
],
libs: [
"telephony-common",
"android.test.runner.stubs",
"android.test.base.stubs",
"android.test.mock.stubs",
"android.car-test-stubs",
"voip-common",
"truth",
],
platform_apis: true,
optimize: {
proguard_flags_files: ["proguard.flags"],
},
dex_preopt: {
enabled: false,
},
lint: {
baseline_filename: "lint-baseline.xml",
},
}
android_test {
name: "CtsVerifier",
static_libs: [
"CtsVerifierLibT",
],
compile_multilib: "both",
additional_manifests: ["AndroidManifest-verifierConfig.xml"],
jni_libs: [
"libctsverifier_jni",
"libctsnativemidi_jni",
"libaudioloopback_jni",
"libmegaaudio_jni",
"libaudio_workload_jni",
],
// Disable coverage since it pushes us over the dex limit and we
// don't actually need to measure the tests themselves.
jacoco: {
exclude_filter: ["**"],
},
}
// 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: "test_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",
],
lint: {
baseline_filename: "lint-baseline2.xml",
},
}
// Build ItsService as a library
android_library {
name: "its-service",
sdk_version: "test_current",
resource_dirs: ["res"],
srcs: [
"src/com/android/cts/verifier/camera/its/*.java",
"src/com/android/cts/verifier/camera/performance/*.java",
":its_service_build_config",
],
static_libs: [
"android-ex-camera2",
"camera_platform_flags_java_lib",
"cts_backported_fixes_verifier",
"cts-camera-performance-tests",
"cts-verifier-framework",
"ctstestrunner-axt",
"androidx.appcompat_appcompat",
"CtsCameraUtils",
"MediaPerformanceClassCommon",
"mediapc-requirements",
],
}
filegroup {
name: "pre_installed_apps",
device_first_srcs: [
":CtsDefaultNotesApp",
":CtsDeviceControlsApp",
":CtsEmptyDeviceAdmin",
":CtsEmptyDeviceOwner",
":CtsPermissionApp",
":CtsForceStopHelper",
":NotificationBot",
":CrossProfileTestApp",
":CtsTtsEngineSelectorTestHelper",
":CtsTtsEngineSelectorTestHelper2",
],
}
filegroup {
name: "other_required_apps",
device_first_srcs: [
":CameraFeatureCombinationVerifier",
":CtsCarWatchdogCompanionApp",
":CtsTileServiceApp",
":CtsVerifierUSBCompanion",
":CtsVpnFirewallAppApi23",
":CtsVpnFirewallAppApi24",
":CtsVpnFirewallAppNotAlwaysOn",
":jetpack-camera-app",
],
}
filegroup {
name: "cts_apps_to_include",
srcs: [
":pre_installed_apps",
":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: [
":cts_apps_to_include",
":camera-its",
":camera-webcam-test",
":secure-playback-test-app",
],
device_common_srcs: [
":android-cts-verifier-notice",
":CtsVerifier",
],
tools: [
"soong_zip",
"merge_zips",
],
out: ["android-cts-verifier.zip"],
cmd: "echo $(locations :cts_apps_to_include) $(location :CtsVerifier) $(location :android-cts-verifier-notice) > $(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) $(location :camera-webcam-test)" +
" $(location :secure-playback-test-app)",
}
// The "cts-verifier" contains: "android-cts-verifier" and "cts-v-host".
genrule {
name: "cts-verifier",
srcs: [
":android-cts-verifier",
":cts-v-host",
],
tools: ["soong_zip"],
out: ["android-cts-verifier.zip"],
cmd: "mkdir $(genDir)/cts-verifier &&" +
" unzip -q -d $(genDir)/cts-verifier $(location :android-cts-verifier) &&" +
" unzip -q -d $(genDir)/cts-verifier/android-cts-verifier $(location :cts-v-host) &&" +
" $(location soong_zip) -d -o $(out) -C $(genDir)/cts-verifier -D $(genDir)/cts-verifier/android-cts-verifier",
dist: {
targets: ["cts"],
},
}
gen_notice {
name: "android-cts-verifier-notice",
for: ["android-cts-verifier"],
stem: "NOTICE",
suffix: ".txt",
}
genrule {
name: "android-cts-verifier-app-list",
srcs: [
":cts_apps_to_include",
],
device_common_srcs: [
":CtsVerifier",
],
out: ["android-cts-verifier-app-list.txt"],
cmd: "echo $(locations :cts_apps_to_include) $(location :CtsVerifier) > $(out)",
}
genrule {
name: "its_service_build_config",
out: ["com/android/cts/verifier/camera/its/BuildConfig.java"],
cmd: "BUILD_NUM=$${BUILD_NUMBER:-local} && " + // Use default "local" if BUILD_NUMBER is not set
"mkdir -p $(genDir)/com/android/cts/verifier/camera/its && " +
"echo 'package com.android.cts.verifier.camera.its;' > $(out) && " +
"echo 'public final class BuildConfig {' >> $(out) && " +
"echo ' public static final String BUILD_NUMBER = \"'$$BUILD_NUM'\";' >> $(out) && " +
"echo ' private BuildConfig() {}' >> $(out) && " +
"echo '}' >> $(out)",
}
filegroup {
name: "android-cts-verifier-app-list-for-make",
srcs: [":android-cts-verifier-app-list"],
export_to_make_var: "SOONG_ANDROID_CTS_VERIFIER_APP_LIST",
}