diff options
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r-- | apex/apex_test.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index d6a5d0909..7bd037481 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -329,7 +329,7 @@ func ensureListEmpty(t *testing.T, result []string) { // Minimal test func TestBasicApex(t *testing.T) { - ctx, _ := testApex(t, ` + ctx, config := testApex(t, ` apex_defaults { name: "myapex-defaults", manifest: ":myapex.manifest", @@ -484,6 +484,16 @@ func TestBasicApex(t *testing.T) { apexRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Rule("apexRule") + // Make sure that Android.mk is created + ab := ctx.ModuleForTests("myapex", "android_common_myapex_image").Module().(*apexBundle) + data := android.AndroidMkDataForTest(t, config, "", ab) + var builder strings.Builder + data.Custom(&builder, ab.BaseModuleName(), "TARGET_", "", data) + + androidMk := builder.String() + ensureContains(t, androidMk, "LOCAL_MODULE := mylib.myapex\n") + ensureNotContains(t, androidMk, "LOCAL_MODULE := mylib.com.android.myapex\n") + optFlags := apexRule.Args["opt_flags"] ensureContains(t, optFlags, "--pubkey vendor/foo/devkeys/testkey.avbpubkey") // Ensure that the NOTICE output is being packaged as an asset. |