summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-03-20 23:35:47 +0000
committer Spandan Das <spandandas@google.com> 2025-03-21 00:32:29 +0000
commitb9a83f1de48de2520b00611c7cf0c373d8f714b9 (patch)
tree7dec84bffa729ebae99308250b03f7a4ee0aa4ee /apex/apex_test.go
parent5fe9b839b0b67218bcdfdbeec06b6813f040939e (diff)
Use Source_apex_name for LOCAL_MODULE in Soong gen Android.mk
For versioned mainline prebuilts, the version is getting written to `LOCAL_MODULE` property in the generated Android.mk file, even when they set Source_apex_name. This CL uses Source_apex_name as the LOCAL_MODULE so that the versioned prebuilt does not get elided from product packaging. Test: m nothing --no-skip-soong-tests Bug: 405153030 Change-Id: I15a6c6d8a3906cced87771ddde05563209c26bc2
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go10
1 files changed, 10 insertions, 0 deletions
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)
+ }
}
}