diff options
author | 2021-03-13 02:36:00 +0000 | |
---|---|---|
committer | 2021-03-17 14:01:02 +0000 | |
commit | 2645a2912f1db4f47e0d02aee2b99fa03c0c014e (patch) | |
tree | f7bb16b9d287587303cf2bb56ed1484585acb98a /java/app_test.go | |
parent | cdb88a996ac9589e5c9ad14f21ab41268a64ea09 (diff) |
Fix app tests to work without javaMockFS()
Bug: 182638834
Test: m nothing
Change-Id: Ia1815557e6d9dba1cb24f824a988c7599263bf85
Diffstat (limited to 'java/app_test.go')
-rw-r--r-- | java/app_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/java/app_test.go b/java/app_test.go index cf8cfa4fb..7168a9645 100644 --- a/java/app_test.go +++ b/java/app_test.go @@ -375,6 +375,9 @@ func TestUpdatableApps(t *testing.T) { errorHandler = android.FixtureExpectsAtLeastOneErrorMatchingPattern(test.expectedError) } javaFixtureFactory. + Extend(FixtureWithPrebuiltApis(map[string][]string{ + "29": {"foo"}, + })). ExtendWithErrorHandler(errorHandler).RunTestWithBp(t, test.bp) }) } @@ -1081,6 +1084,9 @@ func TestAppSdkVersion(t *testing.T) { 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 @@ func TestVendorAppSdkVersion(t *testing.T) { 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 @@ func TestUsesLibraries(t *testing.T) { ` 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 @@ func TestUncompressDex(t *testing.T) { t.Helper() result := javaFixtureFactory.Extend( + PrepareForTestWithPrebuiltsOfCurrentApi, android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) { if unbundled { variables.Unbundled_build = proptools.BoolPtr(true) |