1// Copyright 2016, The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 // See: http://go/android-license-faq 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20java_defaults { 21 name: "CellBroadcastTestCommon", 22 libs: [ 23 "android.test.runner", 24 "telephony-common", 25 "android.test.base", 26 "android.test.mock", 27 ], 28 static_libs: [ 29 "androidx.test.rules", 30 "androidx.test.espresso.core", 31 "mockito-target-minus-junit4", 32 "truth-prebuilt", 33 "ub-uiautomator", 34 ], 35 // Include all test java files. 36 srcs: [":cellbroadcastreceiver-shared-srcs-test"], 37 platform_apis: true, 38} 39 40// in order to have our tests run on OEM devices, the test apk here includes 41// module code within it and filters out tests which require UI. 42// For the full test apk which does not run on OEM devices, see CellBroadcastReceiverUnitTests 43android_test { 44 name: "CellBroadcastReceiverOemUnitTests", 45 defaults: ["CellBroadcastTestCommon"], 46 srcs: [":cellbroadcastreceiver-sources"], 47 test_suites: ["device-tests", "mts-cellbroadcast"], 48 manifest: "AndroidManifest_OemTesting.xml", 49 test_config: "AndroidTest_Oem.xml", 50 resource_dirs: [ 51 "main-res", 52 ], 53 aaptflags: [ 54 "--custom-package com.android.cellbroadcastreceiver" 55 ], 56 static_libs: [ 57 "androidx.legacy_legacy-support-v4", 58 "androidx.legacy_legacy-support-v13", 59 "androidx.recyclerview_recyclerview", 60 "androidx.preference_preference", 61 "androidx.appcompat_appcompat", 62 "androidx.legacy_legacy-preference-v14", 63 "SettingsLibSettingsTheme", 64 "SettingsLibCollapsingToolbarBaseActivity", 65 "SettingsLibMainSwitchPreference", 66 "SettingsLibTopIntroPreference", 67 "modules-utils-build_system", 68 "cellbroadcast-java-proto-lite", 69 ], 70 min_sdk_version: "30", 71} 72 73 74// used to run mts coverage test 75android_test { 76 name: "CellBroadcastReceiverUnitTests", 77 certificate: "networkstack", 78 defaults: ["CellBroadcastTestCommon"], 79 instrumentation_for: "CellBroadcastApp", 80 test_suites: ["device-tests", "mts-cellbroadcast"], 81 manifest: "AndroidManifest.xml", 82 test_config: "AndroidTest.xml", 83} 84 85android_test { 86 name: "CellBroadcastReceiverGoogleUnitTests", 87 certificate: "networkstack", 88 defaults: ["CellBroadcastTestCommon"], 89 instrumentation_for: "CellBroadcastApp", 90 test_suites: ["device-tests", "mts-cellbroadcast"], 91 manifest: "AndroidManifest.xml", 92 test_config: "AndroidTest_PixelExperience.xml", 93} 94 95android_test { 96 name: "CellBroadcastReceiverPlatformUnitTests", 97 certificate: "platform", 98 defaults: ["CellBroadcastTestCommon"], 99 instrumentation_for: "CellBroadcastAppPlatform", 100 test_suites: ["device-tests"], 101 data: [ 102 ":CellBroadcastReceiverUnitTests", 103 ], 104} 105 106// used to share src with unit test app 107filegroup { 108 name: "cellbroadcastreceiver-shared-srcs-test", 109 srcs: [ 110 "src/**/*.java", 111 ], 112} 113