blob: 351b9f4f5a4ca20cfc0b4935879f39add7fec3f4 [file] [log] [blame]
Lorenzo Colitti4896e322020-03-17 01:07:47 +09001//
2// Copyright (C) 2020 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//
Bob Badour97e6be22021-02-12 14:45:04 -080016package {
17 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
paulhu64632652020-04-06 14:58:12 +080020java_defaults {
21 name: "TetheringIntegrationTestsDefaults",
Lorenzo Colitti4896e322020-03-17 01:07:47 +090022 srcs: [
23 "src/**/*.java",
24 "src/**/*.kt",
25 ],
markchien7193a1b2021-04-27 01:50:31 +080026 min_sdk_version: "30",
Lorenzo Colitti4896e322020-03-17 01:07:47 +090027 static_libs: [
28 "NetworkStackApiStableLib",
29 "androidx.test.rules",
Lorenzo Colitti4896e322020-03-17 01:07:47 +090030 "mockito-target-extended-minus-junit4",
31 "net-tests-utils",
32 "testables",
33 ],
34 libs: [
35 "android.test.runner",
36 "android.test.base",
37 "android.test.mock",
38 ],
paulhud584d2f2020-04-08 09:57:57 +080039 jni_libs: [
40 // For mockito extended
41 "libdexmakerjvmtiagent",
42 "libstaticjvmtiagent",
43 ],
paulhu64632652020-04-06 14:58:12 +080044 jarjar_rules: ":NetworkStackJarJarRules",
Lorenzo Colitti4896e322020-03-17 01:07:47 +090045}
paulhu64632652020-04-06 14:58:12 +080046
47android_library {
markchien7193a1b2021-04-27 01:50:31 +080048 name: "TetheringIntegrationTestsLatestSdkLib",
49 target_sdk_version: "30",
paulhu64632652020-04-06 14:58:12 +080050 platform_apis: true,
51 defaults: ["TetheringIntegrationTestsDefaults"],
Baligh Uddin661ae392020-11-04 05:34:06 +000052 visibility: [
Baligh Uddin661ae392020-11-04 05:34:06 +000053 "//packages/modules/Connectivity/tests/cts/tethering",
markchien7193a1b2021-04-27 01:50:31 +080054 "//packages/modules/Connectivity/Tethering/tests/mts",
55 ]
56}
57
58android_library {
59 name: "TetheringIntegrationTestsLib",
60 target_sdk_version: "current",
61 platform_apis: true,
62 defaults: ["TetheringIntegrationTestsDefaults"],
63 visibility: [
64 "//packages/modules/Connectivity/tests/cts/tethering",
65 "//packages/modules/Connectivity/Tethering/tests/mts",
Baligh Uddin661ae392020-11-04 05:34:06 +000066 ]
paulhu64632652020-04-06 14:58:12 +080067}
68
69android_test {
70 name: "TetheringIntegrationTests",
71 platform_apis: true,
72 defaults: ["TetheringIntegrationTestsDefaults"],
73 test_suites: [
74 "device-tests",
75 "mts",
76 ],
77 compile_multilib: "both",
78}
79
80// Special version of the tethering tests that includes all tests necessary for code coverage
81// purposes. This is currently the union of TetheringTests, TetheringIntegrationTests and
82// NetworkStackTests.
83android_test {
84 name: "TetheringCoverageTests",
paulhu64632652020-04-06 14:58:12 +080085 platform_apis: true,
markchien7193a1b2021-04-27 01:50:31 +080086 min_sdk_version: "30",
87 target_sdk_version: "30",
paulhu64632652020-04-06 14:58:12 +080088 test_suites: ["device-tests", "mts"],
89 test_config: "AndroidTest_Coverage.xml",
90 defaults: ["libnetworkstackutilsjni_deps"],
91 static_libs: [
markchienb23e9122021-04-27 17:23:44 +080092 "modules-utils-native-coverage-listener",
lucaslin5dc7de22021-01-16 17:46:21 +080093 "NetdStaticLibTestsLib",
markchien90b45352020-04-21 17:42:47 +080094 "NetworkStaticLibTestsLib",
paulhu64632652020-04-06 14:58:12 +080095 "NetworkStackTestsLib",
markchien7193a1b2021-04-27 01:50:31 +080096 "TetheringTestsLatestSdkLib",
97 "TetheringIntegrationTestsLatestSdkLib",
paulhu64632652020-04-06 14:58:12 +080098 ],
99 jni_libs: [
100 // For mockito extended
101 "libdexmakerjvmtiagent",
102 "libstaticjvmtiagent",
103 // For NetworkStackUtils included in NetworkStackBase
104 "libnetworkstackutilsjni",
Maciej Żenczykowskic92e8ce2021-02-11 15:54:05 -0800105 "libtetherutilsjni",
paulhu64632652020-04-06 14:58:12 +0800106 ],
markchiene3126482020-10-26 13:53:05 +0800107 jarjar_rules: ":TetheringTestsJarJarRules",
paulhu64632652020-04-06 14:58:12 +0800108 compile_multilib: "both",
109 manifest: "AndroidManifest_coverage.xml",
markchiene3126482020-10-26 13:53:05 +0800110}