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