Add overrides to runtime_resource_overlay
(This is a cherry-pick change.) Bug: 154928457 Test: app_test.go Change-Id: Ia52bb9fd18c22b1a02d7b36afd41561cec0473f0 Merged-In: Ia52bb9fd18c22b1a02d7b36afd41561cec0473f0
This commit is contained in:
@@ -2470,6 +2470,7 @@ func TestRuntimeResourceOverlay(t *testing.T) {
|
||||
certificate: "platform",
|
||||
product_specific: true,
|
||||
theme: "faza",
|
||||
overrides: ["foo"],
|
||||
}
|
||||
|
||||
android_library {
|
||||
@@ -2517,14 +2518,15 @@ func TestRuntimeResourceOverlay(t *testing.T) {
|
||||
if expected != signingFlag {
|
||||
t.Errorf("Incorrect signing flags, expected: %q, got: %q", expected, signingFlag)
|
||||
}
|
||||
path := android.AndroidMkEntriesForTest(t, config, "", m.Module())[0].EntryMap["LOCAL_CERTIFICATE"]
|
||||
androidMkEntries := android.AndroidMkEntriesForTest(t, config, "", m.Module())[0]
|
||||
path := androidMkEntries.EntryMap["LOCAL_CERTIFICATE"]
|
||||
expectedPath := []string{"build/make/target/product/security/platform.x509.pem"}
|
||||
if !reflect.DeepEqual(path, expectedPath) {
|
||||
t.Errorf("Unexpected LOCAL_CERTIFICATE value: %v, expected: %v", path, expectedPath)
|
||||
}
|
||||
|
||||
// Check device location.
|
||||
path = android.AndroidMkEntriesForTest(t, config, "", m.Module())[0].EntryMap["LOCAL_MODULE_PATH"]
|
||||
path = androidMkEntries.EntryMap["LOCAL_MODULE_PATH"]
|
||||
expectedPath = []string{"/tmp/target/product/test_device/product/overlay"}
|
||||
if !reflect.DeepEqual(path, expectedPath) {
|
||||
t.Errorf("Unexpected LOCAL_MODULE_PATH value: %v, expected: %v", path, expectedPath)
|
||||
@@ -2532,9 +2534,16 @@ func TestRuntimeResourceOverlay(t *testing.T) {
|
||||
|
||||
// A themed module has a different device location
|
||||
m = ctx.ModuleForTests("foo_themed", "android_common")
|
||||
path = android.AndroidMkEntriesForTest(t, config, "", m.Module())[0].EntryMap["LOCAL_MODULE_PATH"]
|
||||
androidMkEntries = android.AndroidMkEntriesForTest(t, config, "", m.Module())[0]
|
||||
path = androidMkEntries.EntryMap["LOCAL_MODULE_PATH"]
|
||||
expectedPath = []string{"/tmp/target/product/test_device/product/overlay/faza"}
|
||||
if !reflect.DeepEqual(path, expectedPath) {
|
||||
t.Errorf("Unexpected LOCAL_MODULE_PATH value: %v, expected: %v", path, expectedPath)
|
||||
}
|
||||
|
||||
overrides := androidMkEntries.EntryMap["LOCAL_OVERRIDES_PACKAGES"]
|
||||
expectedOverrides := []string{"foo"}
|
||||
if !reflect.DeepEqual(overrides, expectedOverrides) {
|
||||
t.Errorf("Unexpected LOCAL_OVERRIDES_PACKAGES value: %v, expected: %v", overrides, expectedOverrides)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user