blob: 9b7d68309fbf1f78c41d23501ebf4fe91a8a0c1a [file] [log] [blame]
markchien43e97e02019-09-03 15:58:06 +08001//
2// Copyright (C) 2019 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
paulhu7e514022020-04-22 10:24:19 +080017// Tests in this folder are included both in unit tests and CTS.
18java_library {
19 name: "TetheringCommonTests",
20 srcs: [
21 "common/**/*.java",
22 "common/**/*.kt"
23 ],
24 static_libs: [
25 "androidx.test.rules",
26 "net-tests-utils",
27 ],
28 // TODO(b/147200698) change sdk_version to module-current and remove framework-minus-apex
29 sdk_version: "core_platform",
30 libs: [
31 "framework-minus-apex",
32 "framework-tethering",
33 ],
34 visibility: ["//cts/tests/tests/tethering"],
35}
36
paulhu64632652020-04-06 14:58:12 +080037java_defaults {
38 name: "TetheringTestsDefaults",
markchiendd6177b2019-09-23 20:29:54 +080039 srcs: [
markchiendd6177b2019-09-23 20:29:54 +080040 "src/**/*.java",
Remi NGUYEN VAN0ef3b752020-01-24 22:57:09 +090041 "src/**/*.kt",
markchiendd6177b2019-09-23 20:29:54 +080042 ],
markchien43e97e02019-09-03 15:58:06 +080043 static_libs: [
paulhu64632652020-04-06 14:58:12 +080044 "TetheringApiCurrentLib",
paulhu7e514022020-04-22 10:24:19 +080045 "TetheringCommonTests",
markchien43e97e02019-09-03 15:58:06 +080046 "androidx.test.rules",
47 "frameworks-base-testutils",
48 "mockito-target-extended-minus-junit4",
paulhu64632652020-04-06 14:58:12 +080049 "net-tests-utils",
markchien43e97e02019-09-03 15:58:06 +080050 "testables",
51 ],
markchienb6ad1962020-02-14 11:55:48 +080052 // TODO(b/147200698) change sdk_version to module-current and
53 // remove framework-minus-apex, ext, and framework-res
54 sdk_version: "core_platform",
markchien43e97e02019-09-03 15:58:06 +080055 libs: [
56 "android.test.runner",
57 "android.test.base",
58 "android.test.mock",
paulhu64632652020-04-06 14:58:12 +080059 "ext",
60 "framework-minus-apex",
61 "framework-res",
markchien9d353822019-12-16 20:15:20 +080062 "framework-tethering",
markchien43e97e02019-09-03 15:58:06 +080063 ],
64 jni_libs: [
65 // For mockito extended
66 "libdexmakerjvmtiagent",
67 "libstaticjvmtiagent",
68 ],
markchien9d353822019-12-16 20:15:20 +080069 jarjar_rules: "jarjar-rules.txt",
markchien43e97e02019-09-03 15:58:06 +080070}
paulhu64632652020-04-06 14:58:12 +080071
72// Library containing the unit tests. This is used by the coverage test target to pull in the
73// unit test code. It is not currently used by the tests themselves because all the build
74// configuration needed by the tests is in the TetheringTestsDefaults rule.
75android_library {
76 name: "TetheringTestsLib",
77 defaults: ["TetheringTestsDefaults"],
78 visibility: [
79 "//frameworks/base/packages/Tethering/tests/integration",
80 ]
81}
82
83android_test {
84 name: "TetheringTests",
85 certificate: "platform",
86 test_suites: [
87 "device-tests",
88 "mts",
89 ],
90 defaults: ["TetheringTestsDefaults"],
91 compile_multilib: "both",
92}