Fix app tests to work without javaMockFS()
Bug: 182638834
Test: m nothing
Change-Id: Ia1815557e6d9dba1cb24f824a988c7599263bf85
diff --git a/java/app_test.go b/java/app_test.go
index cf8cfa4..7168a96 100644
--- a/java/app_test.go
+++ b/java/app_test.go
@@ -375,6 +375,9 @@
errorHandler = android.FixtureExpectsAtLeastOneErrorMatchingPattern(test.expectedError)
}
javaFixtureFactory.
+ Extend(FixtureWithPrebuiltApis(map[string][]string{
+ "29": {"foo"},
+ })).
ExtendWithErrorHandler(errorHandler).RunTestWithBp(t, test.bp)
})
}
@@ -1081,6 +1084,9 @@
variables.Platform_version_active_codenames = test.activeCodenames
variables.Platform_sdk_final = &test.platformSdkFinal
}),
+ FixtureWithPrebuiltApis(map[string][]string{
+ "14": {"foo"},
+ }),
).RunTestWithBp(t, bp)
checkSdkVersion(t, result, test.expectedMinSdkVersion)
@@ -1147,6 +1153,11 @@
variables.DeviceCurrentApiLevelForVendorModules = &test.deviceCurrentApiLevelForVendorModules
variables.DeviceSystemSdkVersions = []string{"28", "29"}
}),
+ FixtureWithPrebuiltApis(map[string][]string{
+ "28": {"foo"},
+ "29": {"foo"},
+ "current": {"foo"},
+ }),
).RunTestWithBp(t, bp)
checkSdkVersion(t, result, test.expectedMinSdkVersion)
@@ -2359,6 +2370,8 @@
`
result := javaFixtureFactory.Extend(
+ PrepareForTestWithJavaSdkLibraryFiles,
+ FixtureWithLastReleaseApis("runtime-library", "foo", "quuz", "qux", "bar", "fred"),
android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
variables.MissingUsesLibraries = []string{"baz"}
}),
@@ -2706,6 +2719,7 @@
t.Helper()
result := javaFixtureFactory.Extend(
+ PrepareForTestWithPrebuiltsOfCurrentApi,
android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
if unbundled {
variables.Unbundled_build = proptools.BoolPtr(true)