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 ], 69 min_sdk_version: "30", 70} 71 72 73// used to run mts coverage test 74android_test { 75 name: "CellBroadcastReceiverUnitTests", 76 certificate: "networkstack", 77 defaults: ["CellBroadcastTestCommon"], 78 instrumentation_for: "CellBroadcastApp", 79 test_suites: ["device-tests", "mts-cellbroadcast"], 80 manifest: "AndroidManifest.xml", 81 test_config: "AndroidTest.xml", 82} 83 84android_test { 85 name: "CellBroadcastReceiverPlatformUnitTests", 86 certificate: "platform", 87 defaults: ["CellBroadcastTestCommon"], 88 instrumentation_for: "CellBroadcastAppPlatform", 89 test_suites: ["device-tests"], 90} 91 92// used to share src with unit test app 93filegroup { 94 name: "cellbroadcastreceiver-shared-srcs-test", 95 srcs: [ 96 "src/**/*.java", 97 ], 98} 99