blob: c26df884bf33f7858658362b6ca03b9a589f0fc1 [file] [log] [blame]
Roopa Sattiraju816d1422022-01-17 08:20:16 -08001// Copyright (C) 2021 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
15// ============================================================
16package {
17 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20filegroup {
21 name: "service-bluetooth-tests-sources",
22 srcs: [
23 "src/**/*.java",
24 ],
25 visibility: [
26 "//frameworks/base",
27 "//frameworks/base/services",
28 "//frameworks/base/services/tests/servicestests",
29 ],
30}
Roopa Sattiraju2806fbd2022-02-14 14:01:40 -080031
32android_test {
33 name: "ServiceBluetoothTests",
34
35 srcs: [
36 "src/**/*.java",
37 ],
38
39 dxflags: ["--multi-dex"],
40
41 java_version: "1.9",
42
43 static_libs: [
44 "androidx.test.rules",
45 "collector-device-lib",
46 "hamcrest-library",
47 "mockito-target-extended-minus-junit4",
48 "platform-test-annotations",
49 "frameworks-base-testutils",
50 "truth-prebuilt",
51
52 // Statically link service-bluetooth-pre-jarjar since we want to test the working copy of
53 // service-uwb, not the on-device copy.
54 // Use pre-jarjar version so that we can reference symbols before they are renamed.
55 // Then, the jarjar_rules here will perform the rename for the entire APK
56 // i.e. service-bluetooth + test code
57 "service-bluetooth-pre-jarjar",
58 ],
59
60 jarjar_rules: ":bluetooth-jarjar-rules",
61
62 libs: [
63 "android.test.runner",
64 "android.test.base",
65 "android.test.mock",
66 "framework-bluetooth-pre-jarjar",
67 ],
68
69 jni_libs: [
70 // these are needed for Extended Mockito
71 "libbluetooth_jni",
72 ],
73 compile_multilib: "both",
74
75 min_sdk_version: "current",
76
77 test_suites: [
78 "general-tests",
79 "mts-bluetooth",
80 ],
81}