Merge "Add "legacy_android10_support" to "apex""
This commit is contained in:
@@ -140,8 +140,8 @@ func testApexContext(t *testing.T, bp string, handlers ...testCustomizer) (*andr
|
||||
ctx.BottomUp("prebuilts", android.PrebuiltMutator).Parallel()
|
||||
})
|
||||
ctx.PreDepsMutators(func(ctx android.RegisterMutatorsContext) {
|
||||
ctx.BottomUp("link", cc.LinkageMutator).Parallel()
|
||||
ctx.BottomUp("vndk", cc.VndkMutator).Parallel()
|
||||
ctx.BottomUp("link", cc.LinkageMutator).Parallel()
|
||||
ctx.BottomUp("test_per_src", cc.TestPerSrcMutator).Parallel()
|
||||
ctx.BottomUp("version", cc.VersionMutator).Parallel()
|
||||
ctx.BottomUp("begin", cc.BeginMutator).Parallel()
|
||||
@@ -547,9 +547,10 @@ func TestApexManifest(t *testing.T) {
|
||||
`)
|
||||
|
||||
module := ctx.ModuleForTests("myapex", "android_common_myapex_image")
|
||||
module.Output("apex_manifest.pb")
|
||||
module.Output("apex_manifest.json")
|
||||
module.Output("apex_manifest_full.json")
|
||||
args := module.Rule("apexRule").Args
|
||||
if manifest := args["manifest"]; manifest != module.Output("apex_manifest.pb").Output.String() {
|
||||
t.Error("manifest should be apex_manifest.pb, but " + manifest)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBasicZipApex(t *testing.T) {
|
||||
@@ -2452,7 +2453,7 @@ func TestApexWithTests(t *testing.T) {
|
||||
ensureContains(t, androidMk, "LOCAL_MODULE := mytest1.myapex\n")
|
||||
ensureContains(t, androidMk, "LOCAL_MODULE := mytest2.myapex\n")
|
||||
ensureContains(t, androidMk, "LOCAL_MODULE := mytest3.myapex\n")
|
||||
ensureContains(t, androidMk, "LOCAL_MODULE := apex_manifest.json.myapex\n")
|
||||
ensureContains(t, androidMk, "LOCAL_MODULE := apex_manifest.pb.myapex\n")
|
||||
ensureContains(t, androidMk, "LOCAL_MODULE := apex_pubkey.myapex\n")
|
||||
ensureContains(t, androidMk, "LOCAL_MODULE := myapex\n")
|
||||
}
|
||||
@@ -3034,6 +3035,26 @@ func TestOverrideApex(t *testing.T) {
|
||||
ensureNotContains(t, androidMk, "LOCAL_MODULE_STEM := myapex.apex")
|
||||
}
|
||||
|
||||
func TestLegacyAndroid10Support(t *testing.T) {
|
||||
ctx, _ := testApex(t, `
|
||||
apex {
|
||||
name: "myapex",
|
||||
key: "myapex.key",
|
||||
legacy_android10_support: true,
|
||||
}
|
||||
|
||||
apex_key {
|
||||
name: "myapex.key",
|
||||
public_key: "testkey.avbpubkey",
|
||||
private_key: "testkey.pem",
|
||||
}
|
||||
`)
|
||||
|
||||
module := ctx.ModuleForTests("myapex", "android_common_myapex_image")
|
||||
args := module.Rule("apexRule").Args
|
||||
ensureContains(t, args["opt_flags"], "--manifest_json "+module.Output("apex_manifest.json").Output.String())
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
run := func() int {
|
||||
setUp()
|
||||
|
Reference in New Issue
Block a user