Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d88fe6c authored by Liz Kammer's avatar Liz Kammer Committed by Automerger Merge Worker
Browse files

Merge "Add test to ensure test data written for flat apex" am: 5903b669 am: 63f3b9a5

Change-Id: Ic083ddbe0e3198eef112d6debb8bacbc2ab30ac2
parents c860d02a 63f3b9a5
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -3456,9 +3456,9 @@ func TestApexWithTests(t *testing.T) {
	ensureContains(t, copyCmds, "image.apex/bin/test/mytest3")

	// Ensure the module is correctly translated.
	apexBundle := ctx.ModuleForTests("myapex", "android_common_myapex_image").Module().(*apexBundle)
	data := android.AndroidMkDataForTest(t, config, "", apexBundle)
	name := apexBundle.BaseModuleName()
	bundle := ctx.ModuleForTests("myapex", "android_common_myapex_image").Module().(*apexBundle)
	data := android.AndroidMkDataForTest(t, config, "", bundle)
	name := bundle.BaseModuleName()
	prefix := "TARGET_"
	var builder strings.Builder
	data.Custom(&builder, name, prefix, "", data)
@@ -3470,6 +3470,12 @@ func TestApexWithTests(t *testing.T) {
	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")

	flatBundle := ctx.ModuleForTests("myapex", "android_common_myapex_flattened").Module().(*apexBundle)
	data = android.AndroidMkDataForTest(t, config, "", flatBundle)
	data.Custom(&builder, name, prefix, "", data)
	flatAndroidMk := builder.String()
	ensureContains(t, flatAndroidMk, "LOCAL_TEST_DATA := :baz :bar/baz\n")
}

func TestInstallExtraFlattenedApexes(t *testing.T) {