// Copyright (C) 2022 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 { default_applicable_licenses: ["Android-Apache-2.0"], } android_test { name: "CtsAdServicesDeviceTestCases", team: "trendy_team_android_rubidium", defaults: ["cts_defaults"], libs: [ "android.test.runner", "android.test.base", "framework-adservices-lib", "auto_value_annotations", ], srcs: ["src/**/*.java"], // Tag this module as a cts test artifact exclude_srcs: [ "src/android/adservices/debuggablects/*.java", "src/android/adservices/rootcts/*.java", ], test_suites: [ "cts", "mts-adservices", "general-tests", "mcts-adservices", ], plugins: [ "auto_value_plugin", "auto_annotation_plugin", ], static_libs: [ "androidx.test.rules", "androidx.test.ext.junit", "androidx.test.ext.truth", "compatibility-device-util-axt", "ctstestrunner-axt", "cts-wm-util", "adservices-clients", "adservices-test-fixtures", "adservices-test-utility", "testng", ], sdk_version: "module_current", min_sdk_version: "Tiramisu", compile_multilib: "both", lint: { extra_check_modules: ["AdServicesTestLintChecker"], test: false, // TODO(b/343741206): remove when checks will run on android_test }, } android_test { name: "CtsAdServicesRootTestCases", defaults: ["cts_defaults"], libs: [ "android.test.runner", "android.test.base", "framework-adservices-lib", "auto_value_annotations", ], srcs: [ "src/android/adservices/rootcts/*.java", "src/android/adservices/utils/*.java", ], // Tag this module as a cts test artifact exclude_srcs: [ "src/android/adservices/debuggablects/*.java", "src/android/adservices/cts/*.java", ], test_suites: [ "cts_root", "mts-adservices", "general-tests", ], plugins: [ "auto_value_plugin", "auto_annotation_plugin", ], static_libs: [ "androidx.test.rules", "androidx.test.ext.junit", "androidx.test.ext.truth", "compatibility-device-util-axt", "ctstestrunner-axt", "cts-wm-util", "adservices-clients", "adservices-test-fixtures", "adservices-test-utility", "testng", ], sdk_version: "module_current", min_sdk_version: "Tiramisu", compile_multilib: "both", manifest: "AndroidManifestRoot.xml", test_config: "AndroidTest.Root.xml", lint: { extra_check_modules: ["AdServicesTestLintChecker"], test: false, // TODO(b/343741206): remove when checks will run on android_test }, } android_test { name: "CtsAdExtServicesDeviceTestCases", defaults: ["cts_defaults"], libs: [ "android.ext.adservices", "android.test.runner", "android.test.base", "framework-adservices-lib", "auto_value_annotations", ], srcs: ["src/**/*.java"], // Tag this module as a cts test artifact exclude_srcs: [ "src/android/adservices/debuggablects/*.java", "src/android/adservices/rootcts/*.java", ], test_suites: [ "cts", "mts-extservices", "general-tests", "mcts-extservices", ], plugins: [ "auto_value_plugin", "auto_annotation_plugin", ], static_libs: [ "androidx.test.rules", "androidx.test.ext.junit", "androidx.test.ext.truth", "compatibility-device-util-axt", "ctstestrunner-axt", "cts-wm-util", "adservices-clients", "adservices-test-fixtures", "adservices-test-utility", "testng", ], sdk_version: "module_current", min_sdk_version: "30", max_sdk_version: "32", test_config: "AndroidTest.ExtServices.xml", manifest: "AndroidManifestExtServices.xml", compile_multilib: "both", lint: { extra_check_modules: ["AdServicesTestLintChecker"], baseline_filename: "lint-baseline-adextservices-devicetestcases.xml", test: false, // TODO(b/343741206): remove when checks will run on android_test }, } android_test { name: "CtsAdServicesDebuggableDeviceTestCases", team: "trendy_team_android_rubidium", defaults: ["cts_defaults"], libs: [ "android.test.runner", "android.test.base", "framework-adservices-lib", ], srcs: ["src/**/*.java"], // Tag this module as a cts test artifact exclude_srcs: [ "src/android/adservices/cts/*.java", "src/android/adservices/rootcts/*.java", ], plugins: [ "auto_value_plugin", "auto_annotation_plugin", ], test_suites: [ "cts", "mts-adservices", "general-tests", "mcts-adservices", ], static_libs: [ "androidx.room_room-runtime", "androidx.room_room-testing", "androidx.test.rules", "androidx.test.ext.junit", "androidx.test.ext.truth", "compatibility-device-util-axt", "ctstestrunner-axt", "cts-wm-util", "adservices-clients", "adservices-test-fixtures", "adservices-test-utility", "mockwebserver", "testng", "auto_value_annotations", ], sdk_version: "module_current", min_sdk_version: "Tiramisu", manifest: "AndroidManifestDebuggable.xml", test_config: "AndroidTestDebuggable.xml", lint: { extra_check_modules: ["AdServicesTestLintChecker"], test: false, // TODO(b/343741206): remove when checks will run on android_test }, } android_test { name: "CtsAdExtServicesDebuggableDeviceTestCases", defaults: ["cts_defaults"], libs: [ "android.test.runner", "android.test.base", "framework-adservices-lib", ], srcs: ["src/**/*.java"], // Tag this module as a cts test artifact exclude_srcs: [ "src/android/adservices/cts/*.java", "src/android/adservices/rootcts/*.java", ], test_suites: [ "cts", "mts-extservices", "general-tests", "mcts-extservices", ], plugins: [ "auto_value_plugin", "auto_annotation_plugin", ], static_libs: [ "androidx.room_room-runtime", "androidx.room_room-testing", "androidx.test.rules", "androidx.test.ext.junit", "androidx.test.ext.truth", "compatibility-device-util-axt", "ctstestrunner-axt", "cts-wm-util", "adservices-clients", "adservices-test-fixtures", "adservices-test-utility", "testng", "auto_value_annotations", ], sdk_version: "module_current", min_sdk_version: "30", max_sdk_version: "32", test_config: "AndroidTestDebuggable.ExtServices.xml", manifest: "AndroidManifestDebuggableExtServices.xml", lint: { extra_check_modules: ["AdServicesTestLintChecker"], baseline_filename: "lint-baseline-adextservices-debuggabletestcases.xml", test: false, // TODO(b/343741206): remove when checks will run on android_test }, } java_library { name: "adservices-cts-test-utility", srcs: [ "src/android/adservices/utils/**/*.java", ], plugins: [ "auto_value_plugin", "auto_annotation_plugin", ], libs: [ "framework-adservices-lib", ], static_libs: [ "adservices-clients", "adservices-test-fixtures", "adservices-test-utility", "androidx.test.rules", "androidx.test.ext.junit", "auto_value_annotations", "mockwebserver", "testng", ], min_sdk_version: "Tiramisu", lint: { extra_check_modules: ["AdServicesTestLintChecker"], baseline_filename: "lint-baseline-testutility.xml", test: false, // TODO(b/343741206): remove when checks will run on android_test }, } // Assets need to be bundled via this android_library since tests in submodules need to load assets. android_library { name: "adservices-cts-assets", asset_dirs: [ "assets", ], // Must use EmptyManifest.xml since "adservices-assets" will also be used by submodule tests. // If we use the normal "AndroidManifest.xml", we will redeclare permissions in the tests. // See b/228270294 for detail on duplicate permissions error. manifest: "EmptyManifest.xml", min_sdk_version: "30", }