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
This commit is contained in:
@@ -222,11 +222,7 @@ func TestBootclasspathFragment_StubLibs(t *testing.T) {
|
||||
PrepareForTestWithJavaSdkLibraryFiles,
|
||||
FixtureWithLastReleaseApis("mysdklibrary", "myothersdklibrary", "mycoreplatform"),
|
||||
FixtureConfigureApexBootJars("someapex:mysdklibrary"),
|
||||
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, `
|
||||
bootclasspath_fragment {
|
||||
name: "myfragment",
|
||||
|
Reference in New Issue
Block a user