From 2cd2f9ad8969ef817f8606fc5cc8988f8e706dba Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Mon, 6 Feb 2023 18:29:08 +0900 Subject: 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 --- apex/apex_test.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'apex/apex_test.go') 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() -- cgit v1.2.3-59-g8ed1b