summaryrefslogtreecommitdiff
path: root/sdk/java_sdk_test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-08-12 16:53:42 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-08-12 16:53:42 +0000
commit08b606153943332075a202450162b02f3eea523a (patch)
treecc5ea4861fa71eb1c12326ae28fbca80bf86cb40 /sdk/java_sdk_test.go
parent9dfccb91a5dfc1bf3637a52165081a54c81c159d (diff)
parentb61c2269435276862c927f40915e9888ae7908f4 (diff)
Merge changes If313580b,I68d50d68 into main
* changes: Use a provider for systems modules Add PrepareForTestWithBuildFlag
Diffstat (limited to 'sdk/java_sdk_test.go')
-rw-r--r--sdk/java_sdk_test.go18
1 files changed, 3 insertions, 15 deletions
diff --git a/sdk/java_sdk_test.go b/sdk/java_sdk_test.go
index 0a5483b07..0fb5c70d2 100644
--- a/sdk/java_sdk_test.go
+++ b/sdk/java_sdk_test.go
@@ -45,11 +45,7 @@ var prepareForSdkTestWithJavaSdkLibrary = android.GroupFixturePreparers(
java.PrepareForTestWithJavaDefaultModules,
java.PrepareForTestWithJavaSdkLibraryFiles,
java.FixtureWithLastReleaseApis("myjavalib"),
- android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
- variables.BuildFlags = map[string]string{
- "RELEASE_HIDDEN_API_EXPORTABLE_STUBS": "true",
- }
- }),
+ android.PrepareForTestWithBuildFlag("RELEASE_HIDDEN_API_EXPORTABLE_STUBS", "true"),
)
// Contains tests for SDK members provided by the java package.
@@ -666,11 +662,7 @@ func TestSnapshotWithJavaSystemModules(t *testing.T) {
"1": {"myjavalib"},
"2": {"myjavalib"},
}),
- android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
- variables.BuildFlags = map[string]string{
- "RELEASE_HIDDEN_API_EXPORTABLE_STUBS": "true",
- }
- }),
+ android.PrepareForTestWithBuildFlag("RELEASE_HIDDEN_API_EXPORTABLE_STUBS", "true"),
).RunTestWithBp(t, `
sdk {
name: "mysdk",
@@ -1313,11 +1305,7 @@ java_sdk_library_import {
func TestSnapshotWithJavaSdkLibrary_CompileDex(t *testing.T) {
result := android.GroupFixturePreparers(
prepareForSdkTestWithJavaSdkLibrary,
- android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
- variables.BuildFlags = map[string]string{
- "RELEASE_HIDDEN_API_EXPORTABLE_STUBS": "true",
- }
- }),
+ android.PrepareForTestWithBuildFlag("RELEASE_HIDDEN_API_EXPORTABLE_STUBS", "true"),
).RunTestWithBp(t, `
sdk {
name: "mysdk",