Merge "Do not rename prebuilt apexes for product packaging" into main am: 9aa84c6110
am: 0b0a99f01f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3197217 Change-Id: I67dcce15611742c000fa9a1b1d205862a28e39af Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -5244,7 +5244,7 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) {
|
||||
myApex := ctx.ModuleForTests("myapex", "android_common_myapex").Module()
|
||||
|
||||
overrideNames := []string{
|
||||
"myapex",
|
||||
"",
|
||||
"myjavalib.myapex",
|
||||
"libfoo.myapex",
|
||||
"libbar.myapex",
|
||||
@@ -11293,13 +11293,6 @@ func TestBootDexJarsMultipleApexPrebuilts(t *testing.T) {
|
||||
// Test that product packaging installs the selected mainline module (either source or a specific prebuilt)
|
||||
// RELEASE_APEX_CONTIRBUTIONS_* build flags will be used to select the correct prebuilt for a specific release config
|
||||
func TestInstallationRulesForMultipleApexPrebuilts(t *testing.T) {
|
||||
// check that the LOCAL_MODULE in the generated mk file matches the name used in PRODUCT_PACKAGES
|
||||
// Since the name used in PRODUCT_PACKAGES does not contain prebuilt_ prefix, LOCAL_MODULE should not contain any prefix either
|
||||
checkLocalModuleName := func(t *testing.T, ctx *android.TestContext, soongApexModuleName string, expectedLocalModuleName string) {
|
||||
// Variations are created based on apex_name
|
||||
entries := android.AndroidMkEntriesForTest(t, ctx, ctx.ModuleForTests(soongApexModuleName, "android_common_com.android.foo").Module())
|
||||
android.AssertStringEquals(t, "LOCAL_MODULE of the prebuilt apex must match the name listed in PRODUCT_PACKAGES", expectedLocalModuleName, entries[0].EntryMap["LOCAL_MODULE"][0])
|
||||
}
|
||||
// for a mainline module family, check that only the flagged soong module is visible to make
|
||||
checkHideFromMake := func(t *testing.T, ctx *android.TestContext, visibleModuleName string, hiddenModuleNames []string) {
|
||||
variation := func(moduleName string) string {
|
||||
@@ -11354,7 +11347,7 @@ func TestInstallationRulesForMultipleApexPrebuilts(t *testing.T) {
|
||||
prebuilt_apex {
|
||||
name: "com.google.android.foo.v2",
|
||||
apex_name: "com.android.foo",
|
||||
source_apex_name: "com.google.android.foo", // source_apex_name becomes LOCAL_MODULE in the generated mk file
|
||||
source_apex_name: "com.google.android.foo",
|
||||
src: "com.android.foo-arm.apex",
|
||||
prefer: true, // prefer is set to true on both the prebuilts to induce an error if flagging is not present
|
||||
}
|
||||
@@ -11440,11 +11433,6 @@ func TestInstallationRulesForMultipleApexPrebuilts(t *testing.T) {
|
||||
}
|
||||
ctx := testApex(t, bp, preparer)
|
||||
|
||||
// Check that the LOCAL_MODULE of the two prebuilts is com.android.foo
|
||||
// This ensures that product packaging can pick them for installation if it has been flagged by apex_contributions
|
||||
checkLocalModuleName(t, ctx, "prebuilt_com.google.android.foo", "com.google.android.foo")
|
||||
checkLocalModuleName(t, ctx, "prebuilt_com.google.android.foo.v2", "com.google.android.foo")
|
||||
|
||||
// Check that
|
||||
// 1. The contents of the selected apex_contributions are visible to make
|
||||
// 2. The rest of the apexes in the mainline module family (source or other prebuilt) is hidden from make
|
||||
|
Reference in New Issue
Block a user