Convert TestAndroidAppImport_Preprocessed to test fixtures

In preparation for a subsequent CL convert the test to use test
fixtures.

Test: m nothing --no-skip-soong-tests
Change-Id: I12f3802419105c7ffc8e00e95a069432c6b99d53
This commit is contained in:
Rashid Zaman
2024-07-24 02:23:10 -07:00
parent 13c6231218
commit 5800d421c3

View File

@@ -777,17 +777,19 @@ func TestAndroidTestImport_Preprocessed(t *testing.T) {
}
func TestAndroidAppImport_Preprocessed(t *testing.T) {
ctx, _ := testJava(t, `
result := android.GroupFixturePreparers(
PrepareForTestWithJavaDefaultModules,
).RunTestWithBp(t, `
android_app_import {
name: "foo",
apk: "prebuilts/apk/app.apk",
presigned: true,
preprocessed: true,
}
`)
`)
apkName := "foo.apk"
variant := ctx.ModuleForTests("foo", "android_common")
variant := result.ModuleForTests("foo", "android_common")
outputBuildParams := variant.Output(apkName).BuildParams
if outputBuildParams.Rule.String() != android.Cp.String() {
t.Errorf("Unexpected prebuilt android_app_import rule: " + outputBuildParams.Rule.String())