blob: 224d87a4f46740ad355a5507e86141d5c65e26d8 [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",
Remi NGUYEN VANeeeed132021-03-30 08:12:27 +000036 "framework-connectivity.impl",
Junyu Laieb6f4be2022-01-17 11:52:57 +000037 "framework-connectivity-tiramisu.impl",
Paul Duffincbac8e02020-05-13 12:28:49 +010038 "framework-tethering.impl",
Paul Hu1cae88f2020-04-22 14:01:56 +000039 ],
Baligh Uddin661ae392020-11-04 05:34:06 +000040 visibility: [
Baligh Uddin661ae392020-11-04 05:34:06 +000041 "//packages/modules/Connectivity/tests/cts/tethering",
42 ],
Paul Hu1cae88f2020-04-22 14:01:56 +000043}
44
paulhud1ebb1e2020-04-06 14:58:12 +080045java_defaults {
46 name: "TetheringTestsDefaults",
markchien7193a1b2021-04-27 01:50:31 +080047 min_sdk_version: "30",
markchiendd6177b2019-09-23 20:29:54 +080048 srcs: [
markchiendd6177b2019-09-23 20:29:54 +080049 "src/**/*.java",
Remi NGUYEN VAN5c146662020-01-24 22:57:09 +090050 "src/**/*.kt",
markchiendd6177b2019-09-23 20:29:54 +080051 ],
markchien43e97e02019-09-03 15:58:06 +080052 static_libs: [
Paul Hu1cae88f2020-04-22 14:01:56 +000053 "TetheringCommonTests",
markchien43e97e02019-09-03 15:58:06 +080054 "androidx.test.rules",
55 "frameworks-base-testutils",
56 "mockito-target-extended-minus-junit4",
paulhud1ebb1e2020-04-06 14:58:12 +080057 "net-tests-utils",
markchien43e97e02019-09-03 15:58:06 +080058 "testables",
59 ],
markchien44fc26d2020-02-06 19:23:26 +080060 // TODO(b/147200698) change sdk_version to module-current and
61 // remove framework-minus-apex, ext, and framework-res
62 sdk_version: "core_platform",
markchien43e97e02019-09-03 15:58:06 +080063 libs: [
64 "android.test.runner",
65 "android.test.base",
66 "android.test.mock",
paulhud1ebb1e2020-04-06 14:58:12 +080067 "ext",
68 "framework-minus-apex",
69 "framework-res",
Remi NGUYEN VAN34d197b2021-03-19 13:11:06 +000070 "framework-connectivity.impl",
Junyu Laieb6f4be2022-01-17 11:52:57 +000071 "framework-connectivity-tiramisu.impl",
Paul Duffincbac8e02020-05-13 12:28:49 +010072 "framework-tethering.impl",
Paul Duffin6812c1b2020-05-31 11:35:50 +010073 "framework-wifi.stubs.module_lib",
markchien43e97e02019-09-03 15:58:06 +080074 ],
75 jni_libs: [
76 // For mockito extended
77 "libdexmakerjvmtiagent",
78 "libstaticjvmtiagent",
markchienf967b112021-11-09 16:56:23 +080079 "libcom_android_networkstack_tethering_util_jni",
markchien43e97e02019-09-03 15:58:06 +080080 ],
81}
paulhud1ebb1e2020-04-06 14:58:12 +080082
83// Library containing the unit tests. This is used by the coverage test target to pull in the
84// unit test code. It is not currently used by the tests themselves because all the build
85// configuration needed by the tests is in the TetheringTestsDefaults rule.
86android_library {
markchien7193a1b2021-04-27 01:50:31 +080087 name: "TetheringTestsLatestSdkLib",
paulhud1ebb1e2020-04-06 14:58:12 +080088 defaults: ["TetheringTestsDefaults"],
markchien598a75b2021-11-22 10:36:32 +080089 static_libs: [
90 "TetheringApiStableLib",
91 ],
markchienbf622582021-11-04 01:09:26 +080092 target_sdk_version: "31",
paulhud1ebb1e2020-04-06 14:58:12 +080093 visibility: [
Remi NGUYEN VANfe20e132021-06-07 13:10:49 +090094 "//packages/modules/Connectivity/tests:__subpackages__",
95 "//packages/modules/Connectivity/Tethering/tests:__subpackages__",
paulhud1ebb1e2020-04-06 14:58:12 +080096 ]
97}
98
99android_test {
100 name: "TetheringTests",
Treehugger Robot369fd252020-05-27 04:17:44 +0000101 platform_apis: true,
paulhud1ebb1e2020-04-06 14:58:12 +0800102 test_suites: [
103 "device-tests",
Kimberly Kreiderc5b3f342021-10-20 18:16:59 +0000104 "mts-tethering",
paulhud1ebb1e2020-04-06 14:58:12 +0800105 ],
markchien598a75b2021-11-22 10:36:32 +0800106 defaults: [
107 "TetheringTestsDefaults",
108 "ConnectivityNextEnableDefaults",
109 ],
110 static_libs: [
111 "TetheringApiCurrentLib",
112 ],
paulhud1ebb1e2020-04-06 14:58:12 +0800113 compile_multilib: "both",
Remi NGUYEN VAN8ea5ee62021-06-28 18:48:43 +0900114 jarjar_rules: ":TetheringTestsJarJarRules",
paulhud1ebb1e2020-04-06 14:58:12 +0800115}