Consolidate defaults for hostside network tests apps.

For now, only share a couple of statements (min_sdk_version and
platform_apis). More will be added later.

Also, remove the test_suites stanzas everywhere. These are not
relevant for test apps because the APKs will be pulled in by
the data: stanzas anyway.

Bug: 365191921
Test: atest CtsHostsideNetworkTests
Change-Id: If510519b3bdd6ab27c1923bae523cddb694e0ecc
This commit is contained in:
Lorenzo Colitti 2024-09-20 13:40:10 +09:00
commit 64cd28ddd7
4 changed files with 15 additions and 24 deletions

View file

@ -23,6 +23,12 @@ package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
java_defaults {
name: "CtsHostsideNetworkTestsAllAppDefaults",
platform_apis: true,
min_sdk_version: "30",
}
java_test_host {
name: "CtsHostsideNetworkTests",
defaults: ["cts_defaults"],

View file

@ -21,7 +21,6 @@ package {
java_defaults {
name: "CtsHostsideNetworkTestsAppDefaults",
platform_apis: true,
static_libs: [
"CtsHostsideNetworkTestsAidl",
"androidx.test.ext.junit",
@ -39,12 +38,6 @@ java_defaults {
srcs: [
"src/**/*.java",
],
// Tag this module as a cts test artifact
test_suites: [
"general-tests",
"sts",
],
min_sdk_version: "30",
}
android_test_helper_app {
@ -53,6 +46,7 @@ android_test_helper_app {
"cts_support_defaults",
"framework-connectivity-test-defaults",
"CtsHostsideNetworkTestsAppDefaults",
"CtsHostsideNetworkTestsAllAppDefaults",
],
}
@ -62,6 +56,7 @@ android_test_helper_app {
"cts_support_defaults",
"framework-connectivity-test-defaults",
"CtsHostsideNetworkTestsAppDefaults",
"CtsHostsideNetworkTestsAllAppDefaults",
"ConnectivityNextEnableDefaults",
],
}

View file

@ -21,19 +21,14 @@ package {
android_test_helper_app {
name: "CtsHostsideNetworkTestsApp2",
defaults: ["cts_support_defaults"],
platform_apis: true,
defaults: [
"cts_support_defaults",
"CtsHostsideNetworkTestsAllAppDefaults",
],
static_libs: [
"androidx.annotation_annotation",
"CtsHostsideNetworkTestsAidl",
],
srcs: ["src/**/*.java"],
// Tag this module as a cts test artifact
test_suites: [
"cts",
"general-tests",
"sts",
],
sdk_version: "test_current",
min_sdk_version: "30",
}

View file

@ -21,7 +21,6 @@ package {
java_defaults {
name: "CtsHostsideNetworkCapTestsAppDefaults",
platform_apis: true,
static_libs: [
"androidx.test.ext.junit",
"androidx.test.rules",
@ -29,13 +28,6 @@ java_defaults {
"cts-net-utils",
],
srcs: ["src/**/*.java"],
// Tag this module as a cts test artifact
test_suites: [
"cts",
"general-tests",
"sts",
],
min_sdk_version: "30",
}
android_test_helper_app {
@ -43,6 +35,7 @@ android_test_helper_app {
defaults: [
"cts_support_defaults",
"CtsHostsideNetworkCapTestsAppDefaults",
"CtsHostsideNetworkTestsAllAppDefaults",
],
manifest: "AndroidManifestWithoutProperty.xml",
sdk_version: "test_current",
@ -53,6 +46,7 @@ android_test_helper_app {
defaults: [
"cts_support_defaults",
"CtsHostsideNetworkCapTestsAppDefaults",
"CtsHostsideNetworkTestsAllAppDefaults",
],
manifest: "AndroidManifestWithProperty.xml",
sdk_version: "test_current",
@ -63,6 +57,7 @@ android_test_helper_app {
defaults: [
"cts_support_defaults",
"CtsHostsideNetworkCapTestsAppDefaults",
"CtsHostsideNetworkTestsAllAppDefaults",
],
target_sdk_version: "33",
manifest: "AndroidManifestWithoutProperty.xml",