summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-03-21 11:39:09 -0700
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-03-21 11:39:09 -0700
commit8b391cba7fbe102dce869f71c97f0954bf61d4b5 (patch)
tree43e56dec074b2ac5185a6955b547ce7b12268108
parent714035f03f1cacaf848b27e344d6ec612286c41e (diff)
parentb9a83f1de48de2520b00611c7cf0c373d8f714b9 (diff)
Merge "Use Source_apex_name for LOCAL_MODULE in Soong gen Android.mk" into main
-rw-r--r--android/androidmk.go3
-rw-r--r--apex/apex_test.go10
2 files changed, 13 insertions, 0 deletions
diff --git a/android/androidmk.go b/android/androidmk.go
index 784559312..7cc6aef00 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -510,6 +510,9 @@ func (a *AndroidMkEntries) fillInEntries(ctx fillInEntriesContext, mod Module) {
a.EntryMap = make(map[string][]string)
base := mod.base()
name := base.BaseModuleName()
+ if bmn, ok := mod.(baseModuleName); ok {
+ name = bmn.BaseModuleName()
+ }
if a.OverrideName != "" {
name = a.OverrideName
}
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 36a697487..327e018f4 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -11468,6 +11468,16 @@ func TestInstallationRulesForMultipleApexPrebuilts(t *testing.T) {
// 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
checkHideFromMake(t, ctx, tc.expectedVisibleModuleName, tc.expectedHiddenModuleNames)
+
+ // Check that source_apex_name is written as LOCAL_MODULE for make packaging
+ if tc.expectedVisibleModuleName == "prebuilt_com.google.android.foo.v2" {
+ apex := ctx.ModuleForTests(t, "prebuilt_com.google.android.foo.v2", "android_common_prebuilt_com.android.foo").Module()
+ entries := android.AndroidMkEntriesForTest(t, ctx, apex)[0]
+
+ expected := "com.google.android.foo"
+ actual := entries.EntryMap["LOCAL_MODULE"][0]
+ android.AssertStringEquals(t, "LOCAL_MODULE", expected, actual)
+ }
}
}