summaryrefslogtreecommitdiff
path: root/java/rro_test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2020-07-03 13:18:24 -0700
committer Colin Cross <ccross@android.com> 2021-02-19 23:05:40 +0000
commitaa2555387d214fc0292406d10714558054d794f3 (patch)
tree3ce6d4a024407fa9520c98c24b62c6534d62a021 /java/rro_test.go
parenta6cfcac7279755c76ab742f21e29f0ab3de2c7ea (diff)
Add ctx to AndroidMkExtraEntriesFunc
Add a ctx parameter to AndroidMkExtraEntriesFunc to allow them to access providers. Test: m checkbuild Change-Id: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc Merged-In: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
Diffstat (limited to 'java/rro_test.go')
-rw-r--r--java/rro_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/java/rro_test.go b/java/rro_test.go
index 345f2ee2b..afe3236dc 100644
--- a/java/rro_test.go
+++ b/java/rro_test.go
@@ -96,7 +96,7 @@ func TestRuntimeResourceOverlay(t *testing.T) {
if expected != signingFlag {
t.Errorf("Incorrect signing flags, expected: %q, got: %q", expected, signingFlag)
}
- androidMkEntries := android.AndroidMkEntriesForTest(t, config, "", m.Module())[0]
+ androidMkEntries := android.AndroidMkEntriesForTest(t, ctx, m.Module())[0]
path := androidMkEntries.EntryMap["LOCAL_CERTIFICATE"]
expectedPath := []string{"build/make/target/product/security/platform.x509.pem"}
if !reflect.DeepEqual(path, expectedPath) {
@@ -112,7 +112,7 @@ func TestRuntimeResourceOverlay(t *testing.T) {
// A themed module has a different device location
m = ctx.ModuleForTests("foo_themed", "android_common")
- androidMkEntries = android.AndroidMkEntriesForTest(t, config, "", m.Module())[0]
+ androidMkEntries = android.AndroidMkEntriesForTest(t, ctx, m.Module())[0]
path = androidMkEntries.EntryMap["LOCAL_MODULE_PATH"]
expectedPath = []string{"/tmp/target/product/test_device/product/overlay/faza"}
if !reflect.DeepEqual(path, expectedPath) {
@@ -127,7 +127,7 @@ func TestRuntimeResourceOverlay(t *testing.T) {
}
func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) {
- ctx, config := testJava(t, `
+ ctx, _ := testJava(t, `
java_defaults {
name: "rro_defaults",
theme: "default_theme",
@@ -159,7 +159,7 @@ func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) {
}
// Check device location.
- path := android.AndroidMkEntriesForTest(t, config, "", m.Module())[0].EntryMap["LOCAL_MODULE_PATH"]
+ path := android.AndroidMkEntriesForTest(t, ctx, m.Module())[0].EntryMap["LOCAL_MODULE_PATH"]
expectedPath := []string{"/tmp/target/product/test_device/product/overlay/default_theme"}
if !reflect.DeepEqual(path, expectedPath) {
t.Errorf("Unexpected LOCAL_MODULE_PATH value: %q, expected: %q", path, expectedPath)
@@ -178,7 +178,7 @@ func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) {
}
// Check device location.
- path = android.AndroidMkEntriesForTest(t, config, "", m.Module())[0].EntryMap["LOCAL_MODULE_PATH"]
+ path = android.AndroidMkEntriesForTest(t, ctx, m.Module())[0].EntryMap["LOCAL_MODULE_PATH"]
expectedPath = []string{"/tmp/target/product/test_device/system/overlay"}
if !reflect.DeepEqual(path, expectedPath) {
t.Errorf("Unexpected LOCAL_MODULE_PATH value: %v, expected: %v", path, expectedPath)
@@ -361,7 +361,7 @@ func TestEnforceRRO_propagatesToDependencies(t *testing.T) {
modules := []string{"foo", "bar"}
for _, moduleName := range modules {
module := ctx.ModuleForTests(moduleName, "android_common")
- mkEntries := android.AndroidMkEntriesForTest(t, config, "", module.Module())[0]
+ mkEntries := android.AndroidMkEntriesForTest(t, ctx, module.Module())[0]
actualRRODirs := mkEntries.EntryMap["LOCAL_SOONG_PRODUCT_RRO_DIRS"]
if !reflect.DeepEqual(actualRRODirs, testCase.rroDirs[moduleName]) {
t.Errorf("exected %s LOCAL_SOONG_PRODUCT_RRO_DIRS entry: %v\ngot:%q",