Group all the preparations needed for testing dexpreopt

Make it easier to test dexpreopt functionality by grouping all the
fixture preparations together.

Bug: 177892522
Test: m nothing
Change-Id: I94f66e3ec82efc4fd791f4fdab678d298565e452
This commit is contained in:
Paul Duffin
2021-03-23 15:41:11 +00:00
parent 3c84eaaa98
commit 9fc9f53423
3 changed files with 64 additions and 29 deletions

View File

@@ -53,7 +53,7 @@ var prepareForJavaTest = android.GroupFixturePreparers(
android.FixtureRegisterWithContext(func(ctx android.RegistrationContext) {
ctx.RegisterPreSingletonType("sdk_versions", sdkPreSingletonFactory)
}),
dexpreopt.PrepareForTestWithDexpreopt,
PrepareForTestWithDexpreopt,
)
func TestMain(m *testing.M) {
@@ -68,7 +68,7 @@ func TestMain(m *testing.M) {
func testJavaError(t *testing.T, pattern string, bp string) (*android.TestContext, android.Config) {
t.Helper()
result := android.GroupFixturePreparers(
prepareForJavaTest, dexpreopt.PrepareForTestWithDexpreopt).
prepareForJavaTest, dexpreopt.PrepareForTestByEnablingDexpreopt).
ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern(pattern)).
RunTestWithBp(t, bp)
return result.TestContext, result.Config