blob: d469b3717ef5c8ea52befbb5111a2d7f832e56c2 [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
Paul Hu1cae88f2020-04-22 14:01:56 +000017// Tests in this folder are included both in unit tests and CTS.
Bob Badour97e6be22021-02-12 14:45:04 -080018package {
19 default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
Paul Hu1cae88f2020-04-22 14:01:56 +000022java_library {
23 name: "TetheringCommonTests",
24 srcs: [
25 "common/**/*.java",
26 "common/**/*.kt"
27 ],
28 static_libs: [
29 "androidx.test.rules",
30 "net-tests-utils",
31 ],
32 // TODO(b/147200698) change sdk_version to module-current and remove framework-minus-apex
33 sdk_version: "core_platform",
34 libs: [
35 "framework-minus-apex",
Paul Duffincbac8e02020-05-13 12:28:49 +010036 "framework-tethering.impl",
Paul Hu1cae88f2020-04-22 14:01:56 +000037 ],
Baligh Uddin661ae392020-11-04 05:34:06 +000038 visibility: [
39 "//cts/tests/tests/tethering",
40 "//packages/modules/Connectivity/tests/cts/tethering",
41 ],
Paul Hu1cae88f2020-04-22 14:01:56 +000042}
43
paulhud1ebb1e2020-04-06 14:58:12 +080044java_defaults {
45 name: "TetheringTestsDefaults",
markchiendd6177b2019-09-23 20:29:54 +080046 srcs: [
markchiendd6177b2019-09-23 20:29:54 +080047 "src/**/*.java",
Remi NGUYEN VAN5c146662020-01-24 22:57:09 +090048 "src/**/*.kt",
markchiendd6177b2019-09-23 20:29:54 +080049 ],
markchien43e97e02019-09-03 15:58:06 +080050 static_libs: [
paulhud1ebb1e2020-04-06 14:58:12 +080051 "TetheringApiCurrentLib",
Paul Hu1cae88f2020-04-22 14:01:56 +000052 "TetheringCommonTests",
markchien43e97e02019-09-03 15:58:06 +080053 "androidx.test.rules",
54 "frameworks-base-testutils",
55 "mockito-target-extended-minus-junit4",
paulhud1ebb1e2020-04-06 14:58:12 +080056 "net-tests-utils",
markchien43e97e02019-09-03 15:58:06 +080057 "testables",
58 ],
markchien44fc26d2020-02-06 19:23:26 +080059 // TODO(b/147200698) change sdk_version to module-current and
60 // remove framework-minus-apex, ext, and framework-res
61 sdk_version: "core_platform",
markchien43e97e02019-09-03 15:58:06 +080062 libs: [
63 "android.test.runner",
64 "android.test.base",
65 "android.test.mock",
paulhud1ebb1e2020-04-06 14:58:12 +080066 "ext",
67 "framework-minus-apex",
68 "framework-res",
Paul Duffincbac8e02020-05-13 12:28:49 +010069 "framework-tethering.impl",
Paul Duffin6812c1b2020-05-31 11:35:50 +010070 "framework-wifi.stubs.module_lib",
markchien43e97e02019-09-03 15:58:06 +080071 ],
72 jni_libs: [
73 // For mockito extended
74 "libdexmakerjvmtiagent",
75 "libstaticjvmtiagent",
Lorenzo Colitti4e92da02021-02-06 00:06:05 +090076 "libtetherutilsjni",
markchien43e97e02019-09-03 15:58:06 +080077 ],
78}
paulhud1ebb1e2020-04-06 14:58:12 +080079
80// Library containing the unit tests. This is used by the coverage test target to pull in the
81// unit test code. It is not currently used by the tests themselves because all the build
82// configuration needed by the tests is in the TetheringTestsDefaults rule.
83android_library {
84 name: "TetheringTestsLib",
85 defaults: ["TetheringTestsDefaults"],
86 visibility: [
87 "//frameworks/base/packages/Tethering/tests/integration",
Baligh Uddinf814b9b2020-10-29 02:11:55 +000088 "//packages/modules/Connectivity/Tethering/tests/integration",
paulhud1ebb1e2020-04-06 14:58:12 +080089 ]
90}
91
92android_test {
93 name: "TetheringTests",
Treehugger Robot369fd252020-05-27 04:17:44 +000094 platform_apis: true,
paulhud1ebb1e2020-04-06 14:58:12 +080095 test_suites: [
96 "device-tests",
97 "mts",
98 ],
markchiene3126482020-10-26 13:53:05 +080099 jarjar_rules: ":TetheringTestsJarJarRules",
paulhud1ebb1e2020-04-06 14:58:12 +0800100 defaults: ["TetheringTestsDefaults"],
101 compile_multilib: "both",
102}