summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Jooyung Han <jooyung@google.com> 2023-02-06 18:29:08 +0900
committer Jooyung Han <jooyung@google.com> 2023-02-07 13:58:19 +0900
commit2cd2f9ad8969ef817f8606fc5cc8988f8e706dba (patch)
tree2aa5d17e86013a9503952fa6a441a311fdbe900c /apex/apex_test.go
parent1bb18bb2aca0a7a53cb6784e1bf49bea94c936d1 (diff)
VNDK APEX doesn't use "apex_name" property
VNDK APEX has been using "apex_name" property to set "name" field in apex_manifest. But setting apex_name had a side-effect of emitting duplicate rules for symbol files for VNDK APEX and its override_apex. (Please see the removed comments for more details about error) Not using "apex_name" fixes the duplicate errors. There're a few more vendor apexes with the same issue, which I will handle in follow-ups. Bug: 267581665 Test: m (soong test) && boot Change-Id: I00f617cef8af4d21880d4e8b9c0b9ab9322ba15c
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 4f300e7a2..e558fee03 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -3806,11 +3806,9 @@ func TestVndkApexNameRule(t *testing.T) {
}`+vndkLibrariesTxtFiles("28", "current"))
assertApexName := func(expected, moduleName string) {
- bundle := ctx.ModuleForTests(moduleName, "android_common_image").Module().(*apexBundle)
- actual := proptools.String(bundle.properties.Apex_name)
- if !reflect.DeepEqual(actual, expected) {
- t.Errorf("Got '%v', expected '%v'", actual, expected)
- }
+ module := ctx.ModuleForTests(moduleName, "android_common_image")
+ apexManifestRule := module.Rule("apexManifestRule")
+ ensureContains(t, apexManifestRule.Args["opt"], "-v name "+expected)
}
assertApexName("com.android.vndk.v29", "com.android.vndk.current")
@@ -4136,9 +4134,6 @@ func TestApexName(t *testing.T) {
`)
module := ctx.ModuleForTests("myapex", "android_common_com.android.myapex_image")
- apexManifestRule := module.Rule("apexManifestRule")
- ensureContains(t, apexManifestRule.Args["opt"], "-v name com.android.myapex")
-
apexBundle := module.Module().(*apexBundle)
data := android.AndroidMkDataForTest(t, ctx, apexBundle)
name := apexBundle.BaseModuleName()