Fix an override_module bug.

proptools.PrependProperties doesn't replace a pointer when both the src
and the dst have one. This prevented override_module from overriding
simple value pointer properties when the base module has existing
values. It turns out this was why the name property needed to be
overwritten manually.

Bug: 122957760
Test: app_test.go
Change-Id: I3302287c31a560422548c22fade95261ddbe606a
This commit is contained in:
Jaewoong Jung
2019-03-27 11:17:14 -07:00
parent ac7f27eab0
commit a641ee9cc7
2 changed files with 9 additions and 10 deletions

View File

@@ -877,6 +877,7 @@ func TestOverrideAndroidApp(t *testing.T) {
android_app {
name: "foo",
srcs: ["a.java"],
certificate: "expiredkey",
overrides: ["baz"],
}
@@ -909,7 +910,7 @@ func TestOverrideAndroidApp(t *testing.T) {
{
variantName: "android_common",
apkPath: "/target/product/test_device/system/app/foo/foo.apk",
signFlag: "build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8",
signFlag: "build/target/product/security/expiredkey.x509.pem build/target/product/security/expiredkey.pk8",
overrides: []string{"baz"},
aaptFlag: "",
},
@@ -923,7 +924,7 @@ func TestOverrideAndroidApp(t *testing.T) {
{
variantName: "baz_android_common",
apkPath: "/target/product/test_device/system/app/baz/baz.apk",
signFlag: "build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8",
signFlag: "build/target/product/security/expiredkey.x509.pem build/target/product/security/expiredkey.pk8",
overrides: []string{"baz", "foo"},
aaptFlag: "--rename-manifest-package org.dandroid.bp",
},