diff options
| author | 2019-12-13 21:10:56 +0000 | |
|---|---|---|
| committer | 2019-12-13 21:10:56 +0000 | |
| commit | e676810de52fc808595cf1120d4bb9034b59a56d (patch) | |
| tree | 96738405f17221b4e306fefedcd80d668a0bc5f4 /apex/apex_test.go | |
| parent | 57b9e1da75a7d7d4c3b8af9a1f701a0d859266e8 (diff) | |
| parent | 3ab2c3e68c83dd6141b2b20ecd79124af6e9f095 (diff) | |
Merge "Install flattened/unflattend apexes for GSI"
Diffstat (limited to 'apex/apex_test.go')
| -rw-r--r-- | apex/apex_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index ee5d0f2ad..a5ccc1bdc 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -2457,6 +2457,29 @@ func TestApexWithTests(t *testing.T) { ensureContains(t, androidMk, "LOCAL_MODULE := myapex\n") } +func TestInstallExtraFlattenedApexes(t *testing.T) { + ctx, config := testApex(t, ` + apex { + name: "myapex", + key: "myapex.key", + } + apex_key { + name: "myapex.key", + public_key: "testkey.avbpubkey", + private_key: "testkey.pem", + } + `, func(fs map[string][]byte, config android.Config) { + config.TestProductVariables.InstallExtraFlattenedApexes = proptools.BoolPtr(true) + }) + ab := ctx.ModuleForTests("myapex", "android_common_myapex_image").Module().(*apexBundle) + ensureListContains(t, ab.externalDeps, "myapex.flattened") + mk := android.AndroidMkDataForTest(t, config, "", ab) + var builder strings.Builder + mk.Custom(&builder, ab.Name(), "TARGET_", "", mk) + androidMk := builder.String() + ensureContains(t, androidMk, "LOCAL_REQUIRED_MODULES += myapex.flattened") +} + func TestApexUsesOtherApex(t *testing.T) { ctx, _ := testApex(t, ` apex { |