diff options
| author | 2019-12-22 05:21:37 +0000 | |
|---|---|---|
| committer | 2019-12-22 05:21:37 +0000 | |
| commit | 7e143af6ee16efad245922acd7baecbd980d2f98 (patch) | |
| tree | e51e77e275f96ec468299517972feb1ecc49ac2a /apex/apex_test.go | |
| parent | 727173eccae1f81e9d1867c31c2ea6a70e466265 (diff) | |
| parent | 6f3937cb2999f08f93eaf18f8921092ec65f61eb (diff) | |
Merge "Add support for java_test_helper_app."
Diffstat (limited to 'apex/apex_test.go')
| -rw-r--r-- | apex/apex_test.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index 60ed801ab..4236ca6ad 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -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`, ` |