Merge changes I046d75db,Ie13817dc am: d2aa190bdc
am: f2c86c8c76
am: 1a3ea67458
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2058908 Change-Id: I9ab91976903abbb4e3ec17b3d26db15447f074d6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -3009,3 +3009,24 @@ func TestTargetSdkVersionManifestFixer(t *testing.T) {
|
||||
android.AssertStringDoesContain(t, testCase.name, manifestFixerArgs, "--targetSdkVersion "+testCase.targetSdkVersionExpected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAppMissingCertificateAllowMissingDependencies(t *testing.T) {
|
||||
result := android.GroupFixturePreparers(
|
||||
PrepareForTestWithJavaDefaultModules,
|
||||
android.PrepareForTestWithAllowMissingDependencies,
|
||||
android.PrepareForTestWithAndroidMk,
|
||||
).RunTestWithBp(t, `
|
||||
android_app {
|
||||
name: "foo",
|
||||
srcs: ["a.java"],
|
||||
certificate: ":missing_certificate",
|
||||
sdk_version: "current",
|
||||
}`)
|
||||
|
||||
foo := result.ModuleForTests("foo", "android_common")
|
||||
fooApk := foo.Output("foo.apk")
|
||||
if fooApk.Rule != android.ErrorRule {
|
||||
t.Fatalf("expected ErrorRule for foo.apk, got %s", fooApk.Rule.String())
|
||||
}
|
||||
android.AssertStringDoesContain(t, "expected error rule message", fooApk.Args["error"], "missing dependencies: missing_certificate\n")
|
||||
}
|
||||
|
Reference in New Issue
Block a user