Prepare tests for dexpreopt changes.

After this change, there is a clear separation between tests that are
related to dexpreopt and tests that are not. The former uses
PrepareForTestWithDexpreopt, while the latter uses
PrepareForTestWithJavaDefaultModules. The benefit is that the latter
will no longer affected by any dexpreopt changes.

Bug: 280776428
Test: m nothing
(cherry picked from https://android-review.googlesource.com/q/commit:b95998be731406209f18fab764b96421a17ab4c9)
Merged-In: Ib957765b9287d51c082e0a33cee17a6bb56daeef
Change-Id: Ib957765b9287d51c082e0a33cee17a6bb56daeef
This commit is contained in:
Jiakai Zhang
2023-05-11 16:39:27 +01:00
committed by Cherrypicker Worker
parent bc9256b531
commit c67528bf7e
13 changed files with 35 additions and 29 deletions

View File

@@ -46,12 +46,11 @@ var prepareForJavaTest = android.GroupFixturePreparers(
// Get the CC build components but not default modules.
cc.PrepareForTestWithCcBuildComponents,
// Include all the default java modules.
PrepareForTestWithJavaDefaultModules,
PrepareForTestWithDexpreopt,
PrepareForTestWithOverlayBuildComponents,
android.FixtureRegisterWithContext(func(ctx android.RegistrationContext) {
ctx.RegisterPreSingletonType("sdk_versions", sdkPreSingletonFactory)
}),
PrepareForTestWithDexpreopt,
)
func TestMain(m *testing.M) {