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.stubs", 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 errorprone: { 74 enabled: true, 75 // Error-prone checking only warns of problems when building. To make the build fail with 76 // these errors, list the specific error-prone problems below. 77 javacflags: [ 78 "-Xep:NullablePrimitive:ERROR", 79 ], 80 }, 81} 82 83// Networking CTS tests for development and release. These tests always target the platform SDK 84// version, and are subject to all the restrictions appropriate to that version. Before SDK 85// finalization, these tests have a min_sdk_version of 10000, but they can still be installed on 86// release devices as their min_sdk_version is set to a production version. 87android_test { 88 name: "CtsNetTestCases", 89 defaults: [ 90 "CtsNetTestCasesDefaults", 91 "ConnectivityNextEnableDefaults", 92 ], 93 static_libs: [ 94 "DhcpPacketLib", 95 "NetworkStackApiCurrentShims", 96 ], 97 test_suites: [ 98 "cts", 99 "mts-tethering", 100 "mcts-tethering", 101 "general-tests", 102 ], 103} 104 105java_defaults { 106 name: "CtsNetTestCasesApiStableDefaults", 107 // TODO: CTS should not depend on the entirety of the networkstack code. 108 static_libs: [ 109 "DhcpPacketLib", 110 "NetworkStackApiStableShims", 111 ], 112 jni_uses_sdk_apis: true, 113 min_sdk_version: "30", 114} 115 116java_defaults { 117 name: "CtsNetTestCasesMaxTargetSdkDefaults", 118 defaults: [ 119 "CtsNetTestCasesDefaults", 120 "CtsNetTestCasesApiStableDefaults", 121 ], 122 test_suites: [ 123 "cts", 124 "general-tests", 125 "mts-tethering", 126 "mcts-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 154android_test_helper_app { 155 name: "CtsCarrierServicePackage", 156 defaults: ["cts_defaults"], 157 package_name: "android.net.cts.carrierservicepackage", 158 manifest: "carrierservicepackage/AndroidManifest.xml", 159 srcs: ["carrierservicepackage/src/**/*.java"], 160 min_sdk_version: "30", 161 // Tag this module as a cts test artifact 162 test_suites: [ 163 "cts", 164 "general-tests", 165 ], 166 sdk_version: "test_current", 167} 168