summaryrefslogtreecommitdiff
path: root/java/droidstubs_test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-08-08 15:50:47 -0700
committer Colin Cross <ccross@android.com> 2024-08-09 16:47:45 -0700
commita66b4630f60847c216699831b99aeb905362ccda (patch)
treef67e64ab0206908cbd5155f74b35b43d6271c26b /java/droidstubs_test.go
parent788f69722c2fb02bad642d7b5e4bb30a2fa6e86a (diff)
Add PrepareForTestWithBuildFlag
Add a helper function that creates a test fixture preparer that sets a build flag, and use it everywhere that was setting build flags manually. Test: all soong tests Flag: EXEMPT refactor Change-Id: I68d50d68787a30d091f0827e8caa51f5c5a762ef
Diffstat (limited to 'java/droidstubs_test.go')
-rw-r--r--java/droidstubs_test.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/java/droidstubs_test.go b/java/droidstubs_test.go
index 6a14f3645..1e8362cf2 100644
--- a/java/droidstubs_test.go
+++ b/java/droidstubs_test.go
@@ -421,11 +421,9 @@ func TestReleaseExportRuntimeApis(t *testing.T) {
result := android.GroupFixturePreparers(
prepareForJavaTest,
android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
- variables.BuildFlags = map[string]string{
- "RELEASE_HIDDEN_API_EXPORTABLE_STUBS": "true",
- }
variables.ExportRuntimeApis = proptools.BoolPtr(true)
}),
+ android.PrepareForTestWithBuildFlag("RELEASE_HIDDEN_API_EXPORTABLE_STUBS", "true"),
android.FixtureMergeMockFs(map[string][]byte{
"a/A.java": nil,
"a/current.txt": nil,