From a66b4630f60847c216699831b99aeb905362ccda Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 8 Aug 2024 15:50:47 -0700 Subject: 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 --- java/system_modules_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'java/system_modules_test.go') diff --git a/java/system_modules_test.go b/java/system_modules_test.go index 336dd2134..1a8d0b5d5 100644 --- a/java/system_modules_test.go +++ b/java/system_modules_test.go @@ -182,11 +182,7 @@ func TestMultipleSystemModulesPrebuilts(t *testing.T) { for _, tc := range testCases { res := android.GroupFixturePreparers( prepareForJavaTest, - android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) { - variables.BuildFlags = map[string]string{ - "RELEASE_APEX_CONTRIBUTIONS_ADSERVICES": "myapex_contributions", - } - }), + android.PrepareForTestWithBuildFlag("RELEASE_APEX_CONTRIBUTIONS_ADSERVICES", "myapex_contributions"), ).RunTestWithBp(t, fmt.Sprintf(bp, tc.selectedDependencyName)) // check that rdep gets the correct variation of system_modules -- cgit v1.2.3-59-g8ed1b