Loading apex/apex.go +2 −0 Original line number Diff line number Diff line Loading @@ -1060,6 +1060,8 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { return true // track transitive dependencies } else if ap, ok := child.(*java.AndroidAppImport); ok { filesInfo = append(filesInfo, apexFileForAndroidApp(ctx, ap, pkgName)) } else if ap, ok := child.(*java.AndroidTestHelperApp); ok { filesInfo = append(filesInfo, apexFileForAndroidApp(ctx, ap, pkgName)) } else { ctx.PropertyErrorf("apps", "%q is not an android_app module", depName) } Loading apex/apex_test.go +30 −0 Original line number Diff line number Diff line Loading @@ -2924,6 +2924,36 @@ func TestApexWithAppImports(t *testing.T) { ensureContains(t, copyCmds, "image.apex/priv-app/AppFooPrivPrebuilt/AppFooPrivPrebuilt.apk") } func TestApexWithTestHelperApp(t *testing.T) { ctx, _ := testApex(t, ` apex { name: "myapex", key: "myapex.key", apps: [ "TesterHelpAppFoo", ], } apex_key { name: "myapex.key", public_key: "testkey.avbpubkey", private_key: "testkey.pem", } android_test_helper_app { name: "TesterHelpAppFoo", srcs: ["foo/bar/MyClass.java"], } `) module := ctx.ModuleForTests("myapex", "android_common_myapex_image") apexRule := module.Rule("apexRule") copyCmds := apexRule.Args["copy_commands"] ensureContains(t, copyCmds, "image.apex/app/TesterHelpAppFoo/TesterHelpAppFoo.apk") } func TestApexPropertiesShouldBeDefaultable(t *testing.T) { // libfoo's apex_available comes from cc_defaults testApexError(t, `"myapex" .*: requires "libfoo" that is not available for the APEX`, ` Loading Loading
apex/apex.go +2 −0 Original line number Diff line number Diff line Loading @@ -1060,6 +1060,8 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { return true // track transitive dependencies } else if ap, ok := child.(*java.AndroidAppImport); ok { filesInfo = append(filesInfo, apexFileForAndroidApp(ctx, ap, pkgName)) } else if ap, ok := child.(*java.AndroidTestHelperApp); ok { filesInfo = append(filesInfo, apexFileForAndroidApp(ctx, ap, pkgName)) } else { ctx.PropertyErrorf("apps", "%q is not an android_app module", depName) } Loading
apex/apex_test.go +30 −0 Original line number Diff line number Diff line Loading @@ -2924,6 +2924,36 @@ func TestApexWithAppImports(t *testing.T) { ensureContains(t, copyCmds, "image.apex/priv-app/AppFooPrivPrebuilt/AppFooPrivPrebuilt.apk") } func TestApexWithTestHelperApp(t *testing.T) { ctx, _ := testApex(t, ` apex { name: "myapex", key: "myapex.key", apps: [ "TesterHelpAppFoo", ], } apex_key { name: "myapex.key", public_key: "testkey.avbpubkey", private_key: "testkey.pem", } android_test_helper_app { name: "TesterHelpAppFoo", srcs: ["foo/bar/MyClass.java"], } `) module := ctx.ModuleForTests("myapex", "android_common_myapex_image") apexRule := module.Rule("apexRule") copyCmds := apexRule.Args["copy_commands"] ensureContains(t, copyCmds, "image.apex/app/TesterHelpAppFoo/TesterHelpAppFoo.apk") } func TestApexPropertiesShouldBeDefaultable(t *testing.T) { // libfoo's apex_available comes from cc_defaults testApexError(t, `"myapex" .*: requires "libfoo" that is not available for the APEX`, ` Loading