summaryrefslogtreecommitdiff
path: root/java/hiddenapi_singleton_test.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-03-16 15:34:36 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-03-16 15:34:36 +0000
commit248f386558e675f35f6e3cd3084bd1fbfe22ddb5 (patch)
tree86c0a2264fbb3c6adffda04c9b3002a66fa8cba9 /java/hiddenapi_singleton_test.go
parentaf0379ca9cd009d1197ee437cd8ea582ab68dd78 (diff)
parentdc92abb7054a25af01dde93d9ff29c46bfe12de7 (diff)
Merge "Fix hiddenapi tests to work without javaMockFS()"
Diffstat (limited to 'java/hiddenapi_singleton_test.go')
-rw-r--r--java/hiddenapi_singleton_test.go8
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)
}),