Merge "Revert "Implement detecting container violations."" into main am: f2d6e5004f am: b2407feae1

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3244001

Change-Id: Iddc3110928d6d237de002dc65e033e7940e2b11e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Satish Yalla
2024-08-28 06:00:22 +00:00
committed by Automerger Merge Worker
17 changed files with 19 additions and 225 deletions

View File

@@ -4929,7 +4929,6 @@ func TestPrebuiltExportDexImplementationJars(t *testing.T) {
java_import {
name: "libfoo",
jars: ["libfoo.jar"],
sdk_version: "core_current",
}
java_sdk_library_import {
@@ -4970,22 +4969,6 @@ func TestPrebuiltExportDexImplementationJars(t *testing.T) {
t.Run("prebuilt with source preferred", func(t *testing.T) {
bp := `
apex {
name: "myapex",
key: "myapex.key",
updatable: false,
java_libs: [
"libfoo",
"libbar",
],
}
apex_key {
name: "myapex.key",
public_key: "testkey.avbpubkey",
private_key: "testkey.pem",
}
prebuilt_apex {
name: "myapex",
arch: {
@@ -5002,21 +4985,10 @@ func TestPrebuiltExportDexImplementationJars(t *testing.T) {
java_import {
name: "libfoo",
jars: ["libfoo.jar"],
apex_available: [
"myapex",
],
compile_dex: true,
sdk_version: "core_current",
}
java_library {
name: "libfoo",
srcs: ["foo/bar/MyClass.java"],
apex_available: [
"myapex",
],
compile_dex: true,
sdk_version: "core_current",
}
java_sdk_library_import {
@@ -5024,21 +4996,12 @@ func TestPrebuiltExportDexImplementationJars(t *testing.T) {
public: {
jars: ["libbar.jar"],
},
apex_available: [
"myapex",
],
compile_dex: true,
}
java_sdk_library {
name: "libbar",
srcs: ["foo/bar/MyClass.java"],
unsafe_ignore_missing_latest_api: true,
apex_available: [
"myapex",
],
compile_dex: true,
sdk_version: "core_current",
}
`
@@ -5047,9 +5010,11 @@ func TestPrebuiltExportDexImplementationJars(t *testing.T) {
checkDexJarBuildPath(t, ctx, "prebuilt_libfoo")
checkDexJarInstallPath(t, ctx, "prebuilt_libfoo")
ensureNoSourceVariant(t, ctx, "libfoo")
checkDexJarBuildPath(t, ctx, "prebuilt_libbar")
checkDexJarInstallPath(t, ctx, "prebuilt_libbar")
ensureNoSourceVariant(t, ctx, "libbar")
})
t.Run("prebuilt preferred with source", func(t *testing.T) {
@@ -5075,7 +5040,6 @@ func TestPrebuiltExportDexImplementationJars(t *testing.T) {
java_library {
name: "libfoo",
sdk_version: "core_current",
}
java_sdk_library_import {
@@ -5202,7 +5166,6 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) {
jars: ["libfoo.jar"],
apex_available: ["myapex"],
permitted_packages: ["foo"],
sdk_version: "core_current",
}
java_sdk_library_import {
@@ -5357,14 +5320,12 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) {
name: "libfoo",
jars: ["libfoo.jar"],
apex_available: ["myapex"],
sdk_version: "core_current",
}
java_library {
name: "libfoo",
srcs: ["foo/bar/MyClass.java"],
apex_available: ["myapex"],
sdk_version: "core_current",
}
java_sdk_library_import {
@@ -5456,7 +5417,6 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) {
jars: ["libfoo.jar"],
apex_available: ["myapex"],
permitted_packages: ["foo"],
sdk_version: "core_current",
}
java_library {
@@ -5464,7 +5424,6 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) {
srcs: ["foo/bar/MyClass.java"],
apex_available: ["myapex"],
installable: true,
sdk_version: "core_current",
}
java_sdk_library_import {
@@ -5555,7 +5514,6 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) {
name: "libfoo",
jars: ["libfoo.jar"],
apex_available: ["myapex"],
sdk_version: "core_current",
}
java_library {
@@ -5564,7 +5522,6 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) {
apex_available: ["myapex"],
permitted_packages: ["foo"],
installable: true,
sdk_version: "core_current",
}
java_sdk_library_import {
@@ -5583,7 +5540,6 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) {
apex_available: ["myapex"],
permitted_packages: ["bar"],
compile_dex: true,
sdk_version: "core_current",
}
`
@@ -6178,7 +6134,6 @@ func TestApexWithTestHelperApp(t *testing.T) {
name: "TesterHelpAppFoo",
srcs: ["foo/bar/MyClass.java"],
apex_available: [ "myapex" ],
sdk_version: "test_current",
}
`)
@@ -7780,7 +7735,7 @@ func TestSymlinksFromApexToSystem(t *testing.T) {
srcs: ["foo/bar/MyClass.java"],
sdk_version: "none",
system_modules: "none",
static_libs: ["myotherjar"],
libs: ["myotherjar"],
apex_available: [
"myapex",
"myapex.updatable",
@@ -8441,7 +8396,6 @@ func TestUpdatable_should_not_set_generate_classpaths_proto(t *testing.T) {
apex_available: [
"myapex",
],
sdk_version: "current",
}
systemserverclasspath_fragment {
@@ -9484,7 +9438,6 @@ func TestApexJavaCoverage(t *testing.T) {
srcs: ["mybootclasspathlib.java"],
apex_available: ["myapex"],
compile_dex: true,
sdk_version: "current",
}
systemserverclasspath_fragment {
@@ -9800,7 +9753,6 @@ func TestSdkLibraryCanHaveHigherMinSdkVersion(t *testing.T) {
unsafe_ignore_missing_latest_api: true,
min_sdk_version: "31",
static_libs: ["util"],
sdk_version: "core_current",
}
java_library {
@@ -9809,7 +9761,6 @@ func TestSdkLibraryCanHaveHigherMinSdkVersion(t *testing.T) {
apex_available: ["myapex"],
min_sdk_version: "31",
static_libs: ["another_util"],
sdk_version: "core_current",
}
java_library {
@@ -9817,7 +9768,6 @@ func TestSdkLibraryCanHaveHigherMinSdkVersion(t *testing.T) {
srcs: ["a.java"],
min_sdk_version: "31",
apex_available: ["myapex"],
sdk_version: "core_current",
}
`)
})
@@ -9873,7 +9823,7 @@ func TestSdkLibraryCanHaveHigherMinSdkVersion(t *testing.T) {
})
t.Run("bootclasspath_fragment jar must set min_sdk_version", func(t *testing.T) {
preparer.
preparer.ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern(`module "mybootclasspathlib".*must set min_sdk_version`)).
RunTestWithBp(t, `
apex {
name: "myapex",
@@ -9904,8 +9854,6 @@ func TestSdkLibraryCanHaveHigherMinSdkVersion(t *testing.T) {
apex_available: ["myapex"],
compile_dex: true,
unsafe_ignore_missing_latest_api: true,
sdk_version: "current",
min_sdk_version: "30",
}
`)
})
@@ -10158,9 +10106,6 @@ func TestApexLintBcpFragmentSdkLibDeps(t *testing.T) {
key: "myapex.key",
bootclasspath_fragments: ["mybootclasspathfragment"],
min_sdk_version: "29",
java_libs: [
"jacocoagent",
],
}
apex_key {
name: "myapex.key",