• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15java_defaults {
16    name: "CellBroadcastTestCommon",
17    libs: [
18        "android.test.runner",
19        "telephony-common",
20        "android.test.base",
21        "android.test.mock",
22    ],
23    static_libs: [
24        "androidx.test.rules",
25        "androidx.test.espresso.core",
26        "mockito-target-minus-junit4",
27        "truth-prebuilt",
28        "ub-uiautomator",
29    ],
30    // Include all test java files.
31    srcs: [":cellbroadcastreceiver-shared-srcs-test"],
32    platform_apis: true,
33}
34
35// in order to have our tests run on OEM devices, the test apk here includes
36// module code within it and filters out tests which require UI.
37// For the full test apk which does not run on OEM devices, see CellBroadcastReceiverUnitTests
38android_test {
39    name: "CellBroadcastReceiverOemUnitTests",
40    defaults: ["CellBroadcastTestCommon"],
41    srcs: [":cellbroadcastreceiver-sources"],
42    test_suites: ["device-tests", "mts"],
43    manifest: "AndroidManifest_OemTesting.xml",
44    test_config: "AndroidTest_Oem.xml",
45    resource_dirs: [
46        "main-res",
47    ],
48    aaptflags: [
49        "--custom-package com.android.cellbroadcastreceiver"
50    ],
51    static_libs: [
52        "androidx.legacy_legacy-support-v4",
53        "androidx.legacy_legacy-support-v13",
54        "androidx.recyclerview_recyclerview",
55        "androidx.preference_preference",
56        "androidx.appcompat_appcompat",
57        "androidx.legacy_legacy-preference-v14",
58    ],
59}
60
61
62// used to run mts coverage test
63android_test {
64    name: "CellBroadcastReceiverUnitTests",
65    certificate: "networkstack",
66    defaults: ["CellBroadcastTestCommon"],
67    instrumentation_for: "CellBroadcastApp",
68    test_suites: ["device-tests", "mts"],
69    manifest: "AndroidManifest.xml",
70    test_config: "AndroidTest.xml",
71}
72
73android_test {
74    name: "CellBroadcastReceiverPlatformUnitTests",
75    certificate: "platform",
76    defaults: ["CellBroadcastTestCommon"],
77    instrumentation_for: "CellBroadcastAppPlatform",
78    test_suites: ["device-tests"],
79}
80
81// used to share src with unit test app
82filegroup {
83    name: "cellbroadcastreceiver-shared-srcs-test",
84    srcs: [
85        "src/**/*.java",
86    ],
87}
88