blob: 956e2e832589f4bfeb43761098adb8bd4486bb37 [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 ],
34 visibility: ["//cts/tests/tests/tethering"],
35}
36
paulhud1ebb1e2020-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 VAN5c146662020-01-24 22:57:09 +090041 "src/**/*.kt",
markchiendd6177b2019-09-23 20:29:54 +080042 ],
markchien43e97e02019-09-03 15:58:06 +080043 static_libs: [
paulhud1ebb1e2020-04-06 14:58:12 +080044 "TetheringApiCurrentLib",
Paul Hu1cae88f2020-04-22 14:01:56 +000045 "TetheringCommonTests",
markchien43e97e02019-09-03 15:58:06 +080046 "androidx.test.rules",
47 "frameworks-base-testutils",
48 "mockito-target-extended-minus-junit4",
paulhud1ebb1e2020-04-06 14:58:12 +080049 "net-tests-utils",
markchien43e97e02019-09-03 15:58:06 +080050 "testables",
51 ],
markchien44fc26d2020-02-06 19:23:26 +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",
paulhud1ebb1e2020-04-06 14:58:12 +080059 "ext",
60 "framework-minus-apex",
61 "framework-res",
Paul Duffincbac8e02020-05-13 12:28:49 +010062 "framework-tethering.impl",
Paul Duffin6812c1b2020-05-31 11:35:50 +010063 "framework-wifi.stubs.module_lib",
markchien43e97e02019-09-03 15:58:06 +080064 ],
65 jni_libs: [
66 // For mockito extended
67 "libdexmakerjvmtiagent",
68 "libstaticjvmtiagent",
69 ],
70}
paulhud1ebb1e2020-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",
Baligh Uddinf814b9b2020-10-29 02:11:55 +000080 "//packages/modules/Connectivity/Tethering/tests/integration",
paulhud1ebb1e2020-04-06 14:58:12 +080081 ]
82}
83
84android_test {
85 name: "TetheringTests",
Treehugger Robot369fd252020-05-27 04:17:44 +000086 platform_apis: true,
paulhud1ebb1e2020-04-06 14:58:12 +080087 test_suites: [
88 "device-tests",
89 "mts",
90 ],
markchiene3126482020-10-26 13:53:05 +080091 jarjar_rules: ":TetheringTestsJarJarRules",
paulhud1ebb1e2020-04-06 14:58:12 +080092 defaults: ["TetheringTestsDefaults"],
93 compile_multilib: "both",
94}