• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19java_defaults {
20    name: "CtsNetTestCasesDefaults",
21    defaults: [
22        "cts_defaults",
23        "framework-connectivity-test-defaults",
24    ],
25
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",
44        ":ike-aes-xcbc",
45    ],
46    jarjar_rules: "jarjar-rules-shared.txt",
47    static_libs: [
48        "bouncycastle-unbundled",
49        "FrameworksNetCommonTests",
50        "core-tests-support",
51        "cts-net-utils",
52        "CtsNetTestsNonUpdatableLib",
53        "ctstestrunner-axt",
54        "junit",
55        "junit-params",
56        "modules-utils-build",
57        "net-utils-framework-common",
58        "truth-prebuilt",
59    ],
60
61    // uncomment when b/13249961 is fixed
62    // sdk_version: "current",
63    platform_apis: true,
64    data: [":ConnectivityChecker"],
65    per_testcase_directory: true,
66    host_required: ["net-tests-utils-host-common"],
67    test_config_template: "AndroidTestTemplate.xml",
68}
69
70// Networking CTS tests for development and release. These tests always target the platform SDK
71// version, and are subject to all the restrictions appropriate to that version. Before SDK
72// finalization, these tests have a min_sdk_version of 10000, and cannot be installed on release
73// devices.
74android_test {
75    name: "CtsNetTestCases",
76    defaults: ["CtsNetTestCasesDefaults", "ConnectivityNextEnableDefaults"],
77    static_libs: [
78        "DhcpPacketLib",
79        "NetworkStackApiCurrentShims",
80    ],
81    test_suites: [
82        "cts",
83        "general-tests",
84    ],
85}
86
87java_defaults {
88    name: "CtsNetTestCasesApiStableDefaults",
89    // TODO: CTS should not depend on the entirety of the networkstack code.
90    static_libs: [
91        "DhcpPacketLib",
92        "NetworkStackApiStableShims",
93    ],
94    jni_uses_sdk_apis: true,
95    min_sdk_version: "29",
96}
97
98// Networking CTS tests that target the latest released SDK. These tests can be installed on release
99// devices at any point in the Android release cycle and are useful for qualifying mainline modules
100// on release devices.
101android_test {
102    name: "CtsNetTestCasesLatestSdk",
103    defaults: [
104        "ConnectivityTestsLatestSdkDefaults",
105        "CtsNetTestCasesDefaults",
106        "CtsNetTestCasesApiStableDefaults",
107    ],
108    test_suites: [
109        "general-tests",
110        "mts-dnsresolver",
111        "mts-networking",
112        "mts-tethering",
113        "mts-wifi",
114    ],
115}
116
117java_defaults {
118    name: "CtsNetTestCasesMaxTargetSdkDefaults",
119    defaults: [
120        "CtsNetTestCasesDefaults",
121        "CtsNetTestCasesApiStableDefaults",
122    ],
123    test_suites: [
124        "cts",
125        "general-tests",
126        "mts-tethering",
127    ],
128}
129
130android_test {
131    name: "CtsNetTestCasesMaxTargetSdk33",  // Must match CtsNetTestCasesMaxTargetSdk33 annotation.
132    defaults: ["CtsNetTestCasesMaxTargetSdkDefaults"],
133    target_sdk_version: "33",
134    package_name: "android.net.cts.maxtargetsdk33",
135    instrumentation_target_package: "android.net.cts.maxtargetsdk33",
136}
137
138android_test {
139    name: "CtsNetTestCasesMaxTargetSdk31",  // Must match CtsNetTestCasesMaxTargetSdk31 annotation.
140    defaults: ["CtsNetTestCasesMaxTargetSdkDefaults"],
141    target_sdk_version: "31",
142    package_name: "android.net.cts.maxtargetsdk31",  // CTS package names must be unique.
143    instrumentation_target_package: "android.net.cts.maxtargetsdk31",
144}
145
146android_test {
147    name: "CtsNetTestCasesMaxTargetSdk30",  // Must match CtsNetTestCasesMaxTargetSdk30 annotation.
148    defaults: ["CtsNetTestCasesMaxTargetSdkDefaults"],
149    target_sdk_version: "30",
150    package_name: "android.net.cts.maxtargetsdk30",  // CTS package names must be unique.
151    instrumentation_target_package: "android.net.cts.maxtargetsdk30",
152}
153