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
This commit is contained in:
Colin Cross
2020-07-03 13:18:24 -07:00
parent a6cfcac727
commit aa2555387d
27 changed files with 238 additions and 203 deletions

View File

@@ -2406,7 +2406,7 @@ func TestAidlFlagsArePassedToTheAidlCompiler(t *testing.T) {
}
func TestDataNativeBinaries(t *testing.T) {
ctx, config := testJava(t, `
ctx, _ := testJava(t, `
java_test_host {
name: "foo",
srcs: ["a.java"],
@@ -2422,7 +2422,7 @@ func TestDataNativeBinaries(t *testing.T) {
buildOS := android.BuildOs.String()
test := ctx.ModuleForTests("foo", buildOS+"_common").Module().(*TestHost)
entries := android.AndroidMkEntriesForTest(t, config, "", test)[0]
entries := android.AndroidMkEntriesForTest(t, ctx, test)[0]
expected := []string{buildDir + "/.intermediates/bin/" + buildOS + "_x86_64_PY3/bin:bin"}
actual := entries.EntryMap["LOCAL_COMPATIBILITY_SUPPORT_FILES"]
if !reflect.DeepEqual(expected, actual) {