diff options
author | Paul Duffin <paulduffin@google.com> | 2021-03-13 08:28:35 +0000 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2021-03-16 14:25:21 +0000 |
commit | dc92abb7054a25af01dde93d9ff29c46bfe12de7 (patch) | |
tree | 944c448e048b24746055862e660bb9cc791d9be2 /java/hiddenapi_singleton_test.go | |
parent | 175947f654b4ac34c4085c74007de195ac999b49 (diff) |
Fix hiddenapi tests to work without javaMockFS()
Bug: 182638834
Test: m nothing
Change-Id: I32e0173f3c2e97b6d6d831c6cfa51cc500f8d2b1
Diffstat (limited to 'java/hiddenapi_singleton_test.go')
-rw-r--r-- | java/hiddenapi_singleton_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/hiddenapi_singleton_test.go b/java/hiddenapi_singleton_test.go index 3894ed36b..f17d436ae 100644 --- a/java/hiddenapi_singleton_test.go +++ b/java/hiddenapi_singleton_test.go @@ -56,6 +56,8 @@ func TestHiddenAPISingleton(t *testing.T) { func TestHiddenAPIIndexSingleton(t *testing.T) { result := hiddenApiFixtureFactory.Extend( + PrepareForTestWithJavaSdkLibraryFiles, + FixtureWithLastReleaseApis("bar"), fixtureSetBootJarsProductVariable("platform:foo", "platform:bar"), ).RunTestWithBp(t, ` java_library { @@ -209,6 +211,9 @@ func TestHiddenAPISingletonSdks(t *testing.T) { systemStub string testStub string corePlatformStub string + + // Additional test preparer + preparer android.FixturePreparer }{ { name: "testBundled", @@ -217,6 +222,7 @@ func TestHiddenAPISingletonSdks(t *testing.T) { systemStub: "android_system_stubs_current", testStub: "android_test_stubs_current", corePlatformStub: "legacy.core.platform.api.stubs", + preparer: android.GroupFixturePreparers(), }, { name: "testUnbundled", unbundledBuild: true, @@ -224,11 +230,13 @@ func TestHiddenAPISingletonSdks(t *testing.T) { systemStub: "sdk_system_current_android", testStub: "sdk_test_current_android", corePlatformStub: "legacy.core.platform.api.stubs", + preparer: PrepareForTestWithPrebuiltsOfCurrentApi, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { result := hiddenApiFixtureFactory.Extend( + tc.preparer, android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) { variables.Always_use_prebuilt_sdks = proptools.BoolPtr(tc.unbundledBuild) }), |