Merge "Integrate hiddenapi processing into boot jars test"

This commit is contained in:
Paul Duffin 2021-02-08 18:43:10 +00:00 committed by Gerrit Code Review
commit 5d0572b7eb
1 changed files with 7 additions and 1 deletions

View File

@ -4631,7 +4631,7 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) {
`
ctx := testDexpreoptWithApexes(t, bp, "", transform)
checkBootDexJarPath(t, ctx, ".intermediates/libfoo/android_common_apex10000/aligned/libfoo.jar")
checkBootDexJarPath(t, ctx, ".intermediates/libfoo/android_common_apex10000/hiddenapi/libfoo.jar")
})
t.Run("prebuilt preferred with source apex disabled", func(t *testing.T) {
@ -6304,6 +6304,7 @@ func testDexpreoptWithApexes(t *testing.T, bp, errmsg string, transformDexpreopt
android.RegisterPrebuiltMutators(ctx)
cc.RegisterRequiredBuildComponentsForTest(ctx)
java.RegisterRequiredBuildComponentsForTest(ctx)
java.RegisterHiddenApiSingletonComponents(ctx)
ctx.PostDepsMutators(android.RegisterOverridePostDepsMutators)
ctx.PreDepsMutators(RegisterPreDepsMutators)
ctx.PostDepsMutators(RegisterPostDepsMutators)
@ -6315,6 +6316,11 @@ func testDexpreoptWithApexes(t *testing.T, bp, errmsg string, transformDexpreopt
transformDexpreoptConfig(dexpreoptConfig)
dexpreopt.SetTestGlobalConfig(config, dexpreoptConfig)
// Make sure that any changes to these dexpreopt properties are mirrored in the corresponding
// product variables that are used by hiddenapi.
config.TestProductVariables.BootJars = dexpreoptConfig.BootJars
config.TestProductVariables.UpdatableBootJars = dexpreoptConfig.UpdatableBootJars
_, errs := ctx.ParseBlueprintsFiles("Android.bp")
android.FailIfErrored(t, errs)