blob: a6179fc60afc597cce7fd887a88fa100c8d8ed60 [file] [log] [blame]
Baligh Uddin6a41dd42020-11-04 04:21:14 +00001// Copyright (C) 2008 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour97e6be22021-02-12 14:45:04 -080015package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
Baligh Uddin6a41dd42020-11-04 04:21:14 +000019java_defaults {
20 name: "CtsNetTestCasesDefaults",
Remi NGUYEN VANeeeed132021-03-30 08:12:27 +000021 defaults: [
22 "cts_defaults",
23 "framework-connectivity-test-defaults",
24 ],
Baligh Uddin6a41dd42020-11-04 04:21:14 +000025
26 // Include both the 32 and 64 bit versions
27 compile_multilib: "both",
28
29 libs: [
30 "voip-common",
31 "android.test.base",
32 ],
33
34 jni_libs: [
35 "libcts_jni",
36 "libnativedns_jni",
37 "libnativemultinetwork_jni",
38 "libnativehelper_compat_libc++",
39 ],
40
41 srcs: [
42 "src/**/*.java",
43 "src/**/*.kt",
Yan Yandf246202020-08-11 17:45:58 -070044 ":ike-aes-xcbc",
Baligh Uddin6a41dd42020-11-04 04:21:14 +000045 ],
46 jarjar_rules: "jarjar-rules-shared.txt",
47 static_libs: [
Daulet Zhanguzinbb540132021-02-24 12:58:21 +000048 "bouncycastle-unbundled",
Baligh Uddin6a41dd42020-11-04 04:21:14 +000049 "FrameworksNetCommonTests",
Baligh Uddin6a41dd42020-11-04 04:21:14 +000050 "core-tests-support",
51 "cts-net-utils",
William Escande02fc7942022-01-20 17:52:03 +010052 "CtsNetTestsNonUpdatableLib",
Baligh Uddin6a41dd42020-11-04 04:21:14 +000053 "ctstestrunner-axt",
54 "junit",
55 "junit-params",
Lorenzo Colitti2be434a2021-02-24 10:51:11 +090056 "modules-utils-build",
Baligh Uddin6a41dd42020-11-04 04:21:14 +000057 "net-utils-framework-common",
58 "truth-prebuilt",
59 ],
60
61 // uncomment when b/13249961 is fixed
62 // sdk_version: "current",
63 platform_apis: true,
Remi NGUYEN VAN9c358cd2021-10-04 19:50:32 +090064 required: ["ConnectivityChecker"],
Lorenzo Colitti9e61b822022-05-28 00:20:06 +090065 test_config_template: "AndroidTestTemplate.xml",
Baligh Uddin6a41dd42020-11-04 04:21:14 +000066}
67
68// Networking CTS tests for development and release. These tests always target the platform SDK
69// version, and are subject to all the restrictions appropriate to that version. Before SDK
70// finalization, these tests have a min_sdk_version of 10000, and cannot be installed on release
71// devices.
72android_test {
73 name: "CtsNetTestCases",
Remi NGUYEN VANf826bce2022-01-26 17:43:53 +090074 defaults: ["CtsNetTestCasesDefaults", "ConnectivityNextEnableDefaults"],
Lorenzo Colitti8060dfe2021-03-01 15:13:09 +090075 static_libs: [
Remi NGUYEN VAN41819922022-05-24 18:40:58 +090076 "DhcpPacketLib",
77 "NetworkStackApiCurrentShims",
Lorenzo Colitti8060dfe2021-03-01 15:13:09 +090078 ],
Baligh Uddin6a41dd42020-11-04 04:21:14 +000079 test_suites: [
80 "cts",
81 "general-tests",
82 ],
Lorenzo Colitti9e61b822022-05-28 00:20:06 +090083}
84
85java_defaults {
86 name: "CtsNetTestCasesApiStableDefaults",
87 // TODO: CTS should not depend on the entirety of the networkstack code.
88 static_libs: [
Remi NGUYEN VAN41819922022-05-24 18:40:58 +090089 "DhcpPacketLib",
90 "NetworkStackApiStableShims",
Lorenzo Colitti9e61b822022-05-28 00:20:06 +090091 ],
92 jni_uses_sdk_apis: true,
93 min_sdk_version: "29",
Baligh Uddin6a41dd42020-11-04 04:21:14 +000094}
95
96// Networking CTS tests that target the latest released SDK. These tests can be installed on release
97// devices at any point in the Android release cycle and are useful for qualifying mainline modules
98// on release devices.
99android_test {
100 name: "CtsNetTestCasesLatestSdk",
Lorenzo Colitti9e61b822022-05-28 00:20:06 +0900101 defaults: [
Lorenzo Colitticc5054b2022-07-22 12:37:17 +0900102 "ConnectivityTestsLatestSdkDefaults",
Lorenzo Colitti9e61b822022-05-28 00:20:06 +0900103 "CtsNetTestCasesDefaults",
104 "CtsNetTestCasesApiStableDefaults",
Lorenzo Colitti8060dfe2021-03-01 15:13:09 +0900105 ],
Baligh Uddin6a41dd42020-11-04 04:21:14 +0000106 test_suites: [
107 "general-tests",
Kimberly Kreider6413dd82020-12-15 10:59:55 -0800108 "mts-dnsresolver",
109 "mts-networking",
110 "mts-tethering",
111 "mts-wifi",
Baligh Uddin6a41dd42020-11-04 04:21:14 +0000112 ],
Baligh Uddin6a41dd42020-11-04 04:21:14 +0000113}
Lorenzo Colitti9e61b822022-05-28 00:20:06 +0900114
115android_test {
116 name: "CtsNetTestCasesMaxTargetSdk31", // Must match CtsNetTestCasesMaxTargetSdk31 annotation.
117 defaults: [
118 "CtsNetTestCasesDefaults",
119 "CtsNetTestCasesApiStableDefaults",
120 ],
121 target_sdk_version: "31",
122 package_name: "android.net.cts.maxtargetsdk31", // CTS package names must be unique.
123 instrumentation_target_package: "android.net.cts.maxtargetsdk31",
124 test_suites: [
125 "cts",
126 "general-tests",
127 "mts-networking",
128 ],
129}
130
Remi NGUYEN VAN348bbb02022-07-19 16:33:04 +0900131android_test {
132 name: "CtsNetTestCasesMaxTargetSdk30", // Must match CtsNetTestCasesMaxTargetSdk30 annotation.
133 defaults: [
134 "CtsNetTestCasesDefaults",
135 "CtsNetTestCasesApiStableDefaults",
136 ],
137 target_sdk_version: "30",
138 package_name: "android.net.cts.maxtargetsdk30", // CTS package names must be unique.
139 instrumentation_target_package: "android.net.cts.maxtargetsdk30",
140 test_suites: [
141 "cts",
142 "general-tests",
143 "mts-networking",
144 ],
145}