blob: 6c479a0971e95db919aa3e8c3314b2401bdb214c [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.
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",
Paul Duffincbac8e02020-05-13 12:28:49 +010032 "framework-tethering.impl",
Paul Hu1cae88f2020-04-22 14:01:56 +000033 ],
Baligh Uddin661ae392020-11-04 05:34:06 +000034 visibility: [
35 "//cts/tests/tests/tethering",
36 "//packages/modules/Connectivity/tests/cts/tethering",
37 ],
Paul Hu1cae88f2020-04-22 14:01:56 +000038}
39
paulhud1ebb1e2020-04-06 14:58:12 +080040java_defaults {
41 name: "TetheringTestsDefaults",
markchiendd6177b2019-09-23 20:29:54 +080042 srcs: [
markchiendd6177b2019-09-23 20:29:54 +080043 "src/**/*.java",
Remi NGUYEN VAN5c146662020-01-24 22:57:09 +090044 "src/**/*.kt",
markchiendd6177b2019-09-23 20:29:54 +080045 ],
markchien43e97e02019-09-03 15:58:06 +080046 static_libs: [
paulhud1ebb1e2020-04-06 14:58:12 +080047 "TetheringApiCurrentLib",
Paul Hu1cae88f2020-04-22 14:01:56 +000048 "TetheringCommonTests",
markchien43e97e02019-09-03 15:58:06 +080049 "androidx.test.rules",
50 "frameworks-base-testutils",
51 "mockito-target-extended-minus-junit4",
paulhud1ebb1e2020-04-06 14:58:12 +080052 "net-tests-utils",
markchien43e97e02019-09-03 15:58:06 +080053 "testables",
54 ],
markchien44fc26d2020-02-06 19:23:26 +080055 // TODO(b/147200698) change sdk_version to module-current and
56 // remove framework-minus-apex, ext, and framework-res
57 sdk_version: "core_platform",
markchien43e97e02019-09-03 15:58:06 +080058 libs: [
59 "android.test.runner",
60 "android.test.base",
61 "android.test.mock",
paulhud1ebb1e2020-04-06 14:58:12 +080062 "ext",
63 "framework-minus-apex",
64 "framework-res",
Paul Duffincbac8e02020-05-13 12:28:49 +010065 "framework-tethering.impl",
Paul Duffin6812c1b2020-05-31 11:35:50 +010066 "framework-wifi.stubs.module_lib",
markchien43e97e02019-09-03 15:58:06 +080067 ],
68 jni_libs: [
69 // For mockito extended
70 "libdexmakerjvmtiagent",
71 "libstaticjvmtiagent",
Lorenzo Colitti4e92da02021-02-06 00:06:05 +090072 "libtetherutilsjni",
markchien43e97e02019-09-03 15:58:06 +080073 ],
74}
paulhud1ebb1e2020-04-06 14:58:12 +080075
76// Library containing the unit tests. This is used by the coverage test target to pull in the
77// unit test code. It is not currently used by the tests themselves because all the build
78// configuration needed by the tests is in the TetheringTestsDefaults rule.
79android_library {
80 name: "TetheringTestsLib",
81 defaults: ["TetheringTestsDefaults"],
82 visibility: [
83 "//frameworks/base/packages/Tethering/tests/integration",
Baligh Uddinf814b9b2020-10-29 02:11:55 +000084 "//packages/modules/Connectivity/Tethering/tests/integration",
paulhud1ebb1e2020-04-06 14:58:12 +080085 ]
86}
87
88android_test {
89 name: "TetheringTests",
Treehugger Robot369fd252020-05-27 04:17:44 +000090 platform_apis: true,
paulhud1ebb1e2020-04-06 14:58:12 +080091 test_suites: [
92 "device-tests",
93 "mts",
94 ],
markchiene3126482020-10-26 13:53:05 +080095 jarjar_rules: ":TetheringTestsJarJarRules",
paulhud1ebb1e2020-04-06 14:58:12 +080096 defaults: ["TetheringTestsDefaults"],
97 compile_multilib: "both",
98}