android_packages_modules_Co.../tests/cts/net/Android.bp
Julien Desprez 33b48e47c6 Backfill new field host_commong_data
This new field ensures that the dependence is properly packaged with the module.
(original context: b/262397555)

Test: presubmit
Bug: 413525819
Flag: TEST_ONLY
Change-Id: Ifca931a4ee7fa671f2316ae731b207404a8edd3d
2025-05-14 13:23:36 -07:00

195 lines
6.2 KiB
Text

// Copyright (C) 2008 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
default_team: "trendy_team_fwk_core_networking",
default_applicable_licenses: ["Android-Apache-2.0"],
}
java_defaults {
name: "CtsNetTestCasesDefaults",
defaults: [
"cts_defaults",
],
// Include both the 32 and 64 bit versions
compile_multilib: "both",
sdk_version: "module_current",
libs: [
"framework-annotations-lib",
"framework-connectivity.impl",
"framework-connectivity-b.impl",
"framework-connectivity-t.impl",
"framework-tethering.impl",
"framework-configinfrastructure.stubs.module_lib",
"framework-bluetooth.stubs.module_lib",
"android.net.ipsec.ike.stubs.module_lib",
"framework-wifi.stubs.module_lib",
// module_current stubs will hide test_stubs symbols in classes that also have module API
// (for example UserManager#isVisibleBackgroundUsersSupported is test API but UserManager
// is picked up from module lib stubs so that method will not be there). But test_stubs
// still provide stubs for classes that are only test API, such as VintfRuntimeInfo.
"android_test_stubs_current",
"voip-common",
"android.test.base.stubs",
],
jni_libs: [
"libcts_jni",
"libnativedns_jni",
"libnativemultinetwork_jni",
"libnativehelper_compat_libc++",
],
srcs: [
"src/**/*.java",
"src/**/*.kt",
":ike-aes-xcbc",
],
jarjar_rules: "jarjar-rules-shared.txt",
static_libs: [
"ApfGeneratorLib",
"bouncycastle-unbundled",
"FrameworksNetCommonTests",
"core-tests-support",
"cts-net-utils",
"CtsNetTestsNonUpdatableLib",
"ctstestrunner-axt",
"DhcpPacketLib",
"junit",
"junit-params",
"modules-utils-build",
"net-tests-utils",
"net-utils-framework-common",
"NetworkStackApiCurrentShims",
"truth",
"TetheringIntegrationTestsBaseLib",
],
min_sdk_version: "30",
per_testcase_directory: true,
host_required: ["net-tests-utils-host-common"],
host_common_data: [":net-tests-utils-host-common"],
test_config_template: "AndroidTestTemplate.xml",
data: [
":ConnectivityTestPreparer",
":CtsCarrierServicePackage",
],
errorprone: {
enabled: true,
// Error-prone checking only warns of problems when building. To make the build fail with
// these errors, list the specific error-prone problems below.
javacflags: [
"-Xep:NullablePrimitive:ERROR",
],
},
}
// Networking CTS tests for development and release. These tests always target the platform SDK
// version, and are subject to all the restrictions appropriate to that version. Before SDK
// finalization, these tests have a min_sdk_version of 10000, but they can still be installed on
// release devices as their min_sdk_version is set to a production version.
android_test {
name: "CtsNetTestCases",
defaults: [
"CtsNetTestCasesDefaults",
],
test_suites: [
"automotive-general-tests",
"cts",
"mts-tethering",
"mcts-tethering",
"general-tests",
],
resource_zips: [":connectivity-module-version-as-resource-zip"],
}
java_defaults {
name: "CtsNetTestCasesMaxTargetSdkDefaults",
defaults: [
"CtsNetTestCasesDefaults",
],
test_suites: [
"cts",
"general-tests",
"mts-tethering",
"mcts-tethering",
],
}
android_test {
name: "CtsNetTestCasesMaxTargetSdk33", // Must match CtsNetTestCasesMaxTargetSdk33 annotation.
defaults: ["CtsNetTestCasesMaxTargetSdkDefaults"],
target_sdk_version: "33",
package_name: "android.net.cts.maxtargetsdk33",
instrumentation_target_package: "android.net.cts.maxtargetsdk33",
test_options: {
test_runner_options: [
{
name: "include-annotation",
value: "com.android.testutils.filters.CtsNetTestCasesMaxTargetSdk33",
},
],
},
}
android_test {
name: "CtsNetTestCasesMaxTargetSdk31", // Must match CtsNetTestCasesMaxTargetSdk31 annotation.
defaults: ["CtsNetTestCasesMaxTargetSdkDefaults"],
target_sdk_version: "31",
package_name: "android.net.cts.maxtargetsdk31", // CTS package names must be unique.
instrumentation_target_package: "android.net.cts.maxtargetsdk31",
test_options: {
test_runner_options: [
{
name: "include-annotation",
value: "com.android.testutils.filters.CtsNetTestCasesMaxTargetSdk31",
},
],
},
}
android_test {
name: "CtsNetTestCasesMaxTargetSdk30", // Must match CtsNetTestCasesMaxTargetSdk30 annotation.
defaults: ["CtsNetTestCasesMaxTargetSdkDefaults"],
target_sdk_version: "30",
package_name: "android.net.cts.maxtargetsdk30", // CTS package names must be unique.
instrumentation_target_package: "android.net.cts.maxtargetsdk30",
test_options: {
test_runner_options: [
{
name: "include-annotation",
value: "com.android.testutils.filters.CtsNetTestCasesMaxTargetSdk30",
},
],
},
}
android_test_helper_app {
name: "CtsCarrierServicePackage",
defaults: ["cts_defaults"],
package_name: "android.net.cts.carrierservicepackage",
manifest: "carrierservicepackage/AndroidManifest.xml",
srcs: ["carrierservicepackage/src/**/*.java"],
min_sdk_version: "30",
// Tag this module as a cts test artifact
test_suites: [
"automotive-general-tests",
"cts",
"general-tests",
],
sdk_version: "test_current",
}