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_team: "trendy_team_fwk_core_networking", 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20java_defaults { 21 name: "CtsNetTestCasesDefaults", 22 defaults: [ 23 "cts_defaults", 24 "framework-connectivity-test-defaults", 25 ], 26 27 // Include both the 32 and 64 bit versions 28 compile_multilib: "both", 29 30 libs: [ 31 "voip-common", 32 "android.test.base", 33 ], 34 35 jni_libs: [ 36 "libcts_jni", 37 "libnativedns_jni", 38 "libnativemultinetwork_jni", 39 "libnativehelper_compat_libc++", 40 ], 41 42 srcs: [ 43 "src/**/*.java", 44 "src/**/*.kt", 45 ":ike-aes-xcbc", 46 ], 47 jarjar_rules: "jarjar-rules-shared.txt", 48 static_libs: [ 49 "ApfGeneratorLib", 50 "bouncycastle-unbundled", 51 "FrameworksNetCommonTests", 52 "core-tests-support", 53 "cts-net-utils", 54 "CtsNetTestsNonUpdatableLib", 55 "ctstestrunner-axt", 56 "junit", 57 "junit-params", 58 "modules-utils-build", 59 "net-tests-utils", 60 "net-utils-framework-common", 61 "truth", 62 "TetheringIntegrationTestsBaseLib", 63 ], 64 65 min_sdk_version: "30", 66 per_testcase_directory: true, 67 host_required: ["net-tests-utils-host-common"], 68 test_config_template: "AndroidTestTemplate.xml", 69 data: [ 70 ":ConnectivityTestPreparer", 71 ":CtsCarrierServicePackage", 72 ], 73} 74 75// Networking CTS tests for development and release. These tests always target the platform SDK 76// version, and are subject to all the restrictions appropriate to that version. Before SDK 77// finalization, these tests have a min_sdk_version of 10000, but they can still be installed on 78// release devices as their min_sdk_version is set to a production version. 79android_test { 80 name: "CtsNetTestCases", 81 defaults: [ 82 "CtsNetTestCasesDefaults", 83 "ConnectivityNextEnableDefaults", 84 ], 85 static_libs: [ 86 "DhcpPacketLib", 87 "NetworkStackApiCurrentShims", 88 ], 89 test_suites: [ 90 "cts", 91 "mts-dnsresolver", 92 "mts-networking", 93 "mts-tethering", 94 "mts-wifi", 95 "mcts-dnsresolver", 96 "mcts-networking", 97 "mcts-tethering", 98 "mcts-wifi", 99 "general-tests", 100 ], 101} 102 103java_defaults { 104 name: "CtsNetTestCasesApiStableDefaults", 105 // TODO: CTS should not depend on the entirety of the networkstack code. 106 static_libs: [ 107 "DhcpPacketLib", 108 "NetworkStackApiStableShims", 109 ], 110 jni_uses_sdk_apis: true, 111 min_sdk_version: "30", 112} 113 114// Networking CTS tests that target the latest released SDK. These tests can be installed on release 115// devices at any point in the Android release cycle and are useful for qualifying mainline modules 116// on release devices. 117android_test { 118 name: "CtsNetTestCasesLatestSdk", 119 defaults: [ 120 "ConnectivityTestsLatestSdkDefaults", 121 "CtsNetTestCasesDefaults", 122 "CtsNetTestCasesApiStableDefaults", 123 ], 124 test_suites: [ 125 "general-tests", 126 "mts-dnsresolver", 127 "mts-networking", 128 "mts-tethering", 129 "mts-wifi", 130 ], 131} 132 133java_defaults { 134 name: "CtsNetTestCasesMaxTargetSdkDefaults", 135 defaults: [ 136 "CtsNetTestCasesDefaults", 137 "CtsNetTestCasesApiStableDefaults", 138 ], 139 test_suites: [ 140 "cts", 141 "general-tests", 142 "mts-tethering", 143 "mcts-tethering", 144 ], 145} 146 147android_test { 148 name: "CtsNetTestCasesMaxTargetSdk33", // Must match CtsNetTestCasesMaxTargetSdk33 annotation. 149 defaults: ["CtsNetTestCasesMaxTargetSdkDefaults"], 150 target_sdk_version: "33", 151 package_name: "android.net.cts.maxtargetsdk33", 152 instrumentation_target_package: "android.net.cts.maxtargetsdk33", 153} 154 155android_test { 156 name: "CtsNetTestCasesMaxTargetSdk31", // Must match CtsNetTestCasesMaxTargetSdk31 annotation. 157 defaults: ["CtsNetTestCasesMaxTargetSdkDefaults"], 158 target_sdk_version: "31", 159 package_name: "android.net.cts.maxtargetsdk31", // CTS package names must be unique. 160 instrumentation_target_package: "android.net.cts.maxtargetsdk31", 161} 162 163android_test { 164 name: "CtsNetTestCasesMaxTargetSdk30", // Must match CtsNetTestCasesMaxTargetSdk30 annotation. 165 defaults: ["CtsNetTestCasesMaxTargetSdkDefaults"], 166 target_sdk_version: "30", 167 package_name: "android.net.cts.maxtargetsdk30", // CTS package names must be unique. 168 instrumentation_target_package: "android.net.cts.maxtargetsdk30", 169} 170 171android_test_helper_app { 172 name: "CtsCarrierServicePackage", 173 defaults: ["cts_defaults"], 174 package_name: "android.net.cts.carrierservicepackage", 175 manifest: "carrierservicepackage/AndroidManifest.xml", 176 srcs: ["carrierservicepackage/src/**/*.java"], 177 min_sdk_version: "30", 178 // Tag this module as a cts test artifact 179 test_suites: [ 180 "cts", 181 "general-tests", 182 ], 183 sdk_version: "test_current", 184} 185