diff options
author | 2020-07-03 13:18:24 -0700 | |
---|---|---|
committer | 2021-02-19 23:05:40 +0000 | |
commit | aa2555387d214fc0292406d10714558054d794f3 (patch) | |
tree | 3ce6d4a024407fa9520c98c24b62c6534d62a021 /sh/sh_binary_test.go | |
parent | a6cfcac7279755c76ab742f21e29f0ab3de2c7ea (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 'sh/sh_binary_test.go')
-rw-r--r-- | sh/sh_binary_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sh/sh_binary_test.go b/sh/sh_binary_test.go index c664461a9..fb7ab1358 100644 --- a/sh/sh_binary_test.go +++ b/sh/sh_binary_test.go @@ -61,7 +61,7 @@ func testShBinary(t *testing.T, bp string) (*android.TestContext, android.Config } func TestShTestSubDir(t *testing.T) { - ctx, config := testShBinary(t, ` + ctx, _ := testShBinary(t, ` sh_test { name: "foo", src: "test.sh", @@ -71,7 +71,7 @@ func TestShTestSubDir(t *testing.T) { mod := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Module().(*ShTest) - entries := android.AndroidMkEntriesForTest(t, config, "", mod)[0] + entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0] expectedPath := "/tmp/target/product/test_device/data/nativetest64/foo_test" actualPath := entries.EntryMap["LOCAL_MODULE_PATH"][0] @@ -81,7 +81,7 @@ func TestShTestSubDir(t *testing.T) { } func TestShTest(t *testing.T) { - ctx, config := testShBinary(t, ` + ctx, _ := testShBinary(t, ` sh_test { name: "foo", src: "test.sh", @@ -95,7 +95,7 @@ func TestShTest(t *testing.T) { mod := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Module().(*ShTest) - entries := android.AndroidMkEntriesForTest(t, config, "", mod)[0] + entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0] expectedPath := "/tmp/target/product/test_device/data/nativetest64/foo" actualPath := entries.EntryMap["LOCAL_MODULE_PATH"][0] @@ -111,7 +111,7 @@ func TestShTest(t *testing.T) { } func TestShTest_dataModules(t *testing.T) { - ctx, config := testShBinary(t, ` + ctx, _ := testShBinary(t, ` sh_test { name: "foo", src: "test.sh", @@ -157,7 +157,7 @@ func TestShTest_dataModules(t *testing.T) { } mod := variant.Module().(*ShTest) - entries := android.AndroidMkEntriesForTest(t, config, "", mod)[0] + entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0] expectedData := []string{ filepath.Join(buildDir, ".intermediates/bar", arch, ":bar"), filepath.Join(buildDir, ".intermediates/foo", arch, "relocated/:lib64/libbar"+libExt), @@ -190,7 +190,7 @@ func TestShTestHost(t *testing.T) { } func TestShTestHost_dataDeviceModules(t *testing.T) { - ctx, config := testShBinary(t, ` + ctx, _ := testShBinary(t, ` sh_test_host { name: "foo", src: "test.sh", @@ -227,7 +227,7 @@ func TestShTestHost_dataDeviceModules(t *testing.T) { } mod := variant.Module().(*ShTest) - entries := android.AndroidMkEntriesForTest(t, config, "", mod)[0] + entries := android.AndroidMkEntriesForTest(t, ctx, mod)[0] expectedData := []string{ filepath.Join(buildDir, ".intermediates/bar/android_arm64_armv8-a/:bar"), // libbar has been relocated, and so has a variant that matches the host arch. |