Merge "Add testOnly attribute to AndroidManifest file of apex_test" am: ac0a9b00a4 am: dc3ffc8c3a am: 95068d632f am: 00568743ba

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1959021

Change-Id: I35cbfea1d3411bf8c6a5d05d5aaf09fd5f6073a8
This commit is contained in:
Gurpreet Singh
2022-02-01 15:38:57 +00:00
committed by Automerger Merge Worker
6 changed files with 181 additions and 58 deletions

View File

@@ -2515,7 +2515,7 @@ func TestUsesLibraries(t *testing.T) {
`--uses-library qux ` +
`--uses-library quuz ` +
`--uses-library runtime-library`
android.AssertStringEquals(t, "manifest_fixer args", expectManifestFixerArgs, actualManifestFixerArgs)
android.AssertStringDoesContain(t, "manifest_fixer args", actualManifestFixerArgs, expectManifestFixerArgs)
// Test that all libraries are verified (library order matters).
verifyCmd := app.Rule("verify_uses_libraries").RuleParams.Command
@@ -3058,7 +3058,7 @@ func TestTargetSdkVersionManifestFixer(t *testing.T) {
result := fixture.RunTestWithBp(t, bp)
foo := result.ModuleForTests("foo", "android_common")
manifestFixerArgs := foo.Output("manifest_fixer/AndroidManifest.xml").Args
android.AssertStringEquals(t, testCase.name, testCase.targetSdkVersionExpected, manifestFixerArgs["targetSdkVersion"])
manifestFixerArgs := foo.Output("manifest_fixer/AndroidManifest.xml").Args["args"]
android.AssertStringDoesContain(t, testCase.name, manifestFixerArgs, "--targetSdkVersion "+testCase.targetSdkVersionExpected)
}
}