Revert^2 "Generate a boot image extension for mainline BCP...

Revert submission 2465993-boot-image-mainline-revert

Reason for revert: Relanding the changes

Reverted changes: /q/submissionid:2465993-boot-image-mainline-revert

Change-Id: Ie611cf3a1ff4be7a7beab164f69b4186c474be5c
This commit is contained in:
Jiakai Zhang 2023-03-06 19:16:48 +00:00
parent da4a78bf40
commit b879620ca8
7 changed files with 456 additions and 13 deletions

View file

@ -293,6 +293,12 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr
isSystemServerJar := global.AllSystemServerJars(ctx).ContainsJar(moduleName(ctx)) isSystemServerJar := global.AllSystemServerJars(ctx).ContainsJar(moduleName(ctx))
bootImage := defaultBootImageConfig(ctx) bootImage := defaultBootImageConfig(ctx)
// When `global.PreoptWithUpdatableBcp` is true, `bcpForDexpreopt` below includes the mainline
// boot jars into bootclasspath, so we should include the mainline boot image as well because it's
// generated from those jars.
if global.PreoptWithUpdatableBcp {
bootImage = mainlineBootImageConfig(ctx)
}
dexFiles, dexLocations := bcpForDexpreopt(ctx, global.PreoptWithUpdatableBcp) dexFiles, dexLocations := bcpForDexpreopt(ctx, global.PreoptWithUpdatableBcp)
targets := ctx.MultiTargets() targets := ctx.MultiTargets()

View file

@ -291,6 +291,9 @@ type bootImageConfig struct {
// The "--compiler-filter" argument. // The "--compiler-filter" argument.
compilerFilter string compilerFilter string
// The "--single-image" argument.
singleImage bool
} }
// Target-dependent description of a boot image. // Target-dependent description of a boot image.
@ -398,6 +401,9 @@ func (image bootImageConfig) moduleFiles(ctx android.PathContext, dir android.Ou
for _, ext := range exts { for _, ext := range exts {
ret = append(ret, dir.Join(ctx, name+ext)) ret = append(ret, dir.Join(ctx, name+ext))
} }
if image.singleImage {
break
}
} }
return ret return ret
} }
@ -768,6 +774,10 @@ func buildBootImageVariant(ctx android.ModuleContext, image *bootImageVariant, p
cmd.FlagWithArg("--compiler-filter=", image.compilerFilter) cmd.FlagWithArg("--compiler-filter=", image.compilerFilter)
} }
if image.singleImage {
cmd.Flag("--single-image")
}
// Use the default variant/features for host builds. // Use the default variant/features for host builds.
// The map below contains only device CPU info (which might be x86 on some devices). // The map below contains only device CPU info (which might be x86 on some devices).
if image.target.Os == android.Android { if image.target.Os == android.Android {

View file

@ -44,6 +44,8 @@ var (
bootImageConfigRawKey = android.NewOnceKey("bootImageConfigRaw") bootImageConfigRawKey = android.NewOnceKey("bootImageConfigRaw")
artBootImageName = "art" artBootImageName = "art"
frameworkBootImageName = "boot" frameworkBootImageName = "boot"
mainlineBootImageName = "mainline"
bootImageStem = "boot"
) )
func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig { func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig {
@ -52,37 +54,52 @@ func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig
artModules := global.ArtApexJars artModules := global.ArtApexJars
frameworkModules := global.BootJars.RemoveList(artModules) frameworkModules := global.BootJars.RemoveList(artModules)
mainlineBcpModules := global.ApexBootJars
frameworkSubdir := "system/framework"
// ART config for the primary boot image in the ART apex. // ART config for the primary boot image in the ART apex.
// It includes the Core Libraries. // It includes the Core Libraries.
artCfg := bootImageConfig{ artCfg := bootImageConfig{
name: artBootImageName, name: artBootImageName,
stem: "boot", stem: bootImageStem,
installDirOnHost: "apex/art_boot_images/javalib", installDirOnHost: "apex/art_boot_images/javalib",
installDirOnDevice: "system/framework", installDirOnDevice: frameworkSubdir,
profileInstallPathInApex: "etc/boot-image.prof", profileInstallPathInApex: "etc/boot-image.prof",
modules: artModules, modules: artModules,
preloadedClassesFile: "art/build/boot/preloaded-classes", preloadedClassesFile: "art/build/boot/preloaded-classes",
compilerFilter: "speed-profile", compilerFilter: "speed-profile",
singleImage: false,
} }
// Framework config for the boot image extension. // Framework config for the boot image extension.
// It includes framework libraries and depends on the ART config. // It includes framework libraries and depends on the ART config.
frameworkSubdir := "system/framework"
frameworkCfg := bootImageConfig{ frameworkCfg := bootImageConfig{
extends: &artCfg, extends: &artCfg,
name: frameworkBootImageName, name: frameworkBootImageName,
stem: "boot", stem: bootImageStem,
installDirOnHost: frameworkSubdir, installDirOnHost: frameworkSubdir,
installDirOnDevice: frameworkSubdir, installDirOnDevice: frameworkSubdir,
modules: frameworkModules, modules: frameworkModules,
preloadedClassesFile: "frameworks/base/config/preloaded-classes", preloadedClassesFile: "frameworks/base/config/preloaded-classes",
compilerFilter: "speed-profile", compilerFilter: "speed-profile",
singleImage: false,
}
mainlineCfg := bootImageConfig{
extends: &frameworkCfg,
name: mainlineBootImageName,
stem: bootImageStem,
installDirOnHost: frameworkSubdir,
installDirOnDevice: frameworkSubdir,
modules: mainlineBcpModules,
compilerFilter: "verify",
singleImage: true,
} }
return map[string]*bootImageConfig{ return map[string]*bootImageConfig{
artBootImageName: &artCfg, artBootImageName: &artCfg,
frameworkBootImageName: &frameworkCfg, frameworkBootImageName: &frameworkCfg,
mainlineBootImageName: &mainlineCfg,
} }
}).(map[string]*bootImageConfig) }).(map[string]*bootImageConfig)
} }
@ -174,6 +191,10 @@ func defaultBootImageConfig(ctx android.PathContext) *bootImageConfig {
return genBootImageConfigs(ctx)[frameworkBootImageName] return genBootImageConfigs(ctx)[frameworkBootImageName]
} }
func mainlineBootImageConfig(ctx android.PathContext) *bootImageConfig {
return genBootImageConfigs(ctx)[mainlineBootImageName]
}
// Apex boot config allows to access build/install paths of apex boot jars without going // Apex boot config allows to access build/install paths of apex boot jars without going
// through the usual trouble of registering dependencies on those modules and extracting build paths // through the usual trouble of registering dependencies on those modules and extracting build paths
// from those dependencies. // from those dependencies.

View file

@ -28,8 +28,10 @@ func TestBootImageConfig(t *testing.T) {
result := android.GroupFixturePreparers( result := android.GroupFixturePreparers(
PrepareForBootImageConfigTest, PrepareForBootImageConfigTest,
PrepareApexBootJarConfigs,
).RunTest(t) ).RunTest(t)
CheckArtBootImageConfig(t, result) CheckArtBootImageConfig(t, result)
CheckFrameworkBootImageConfig(t, result) CheckFrameworkBootImageConfig(t, result)
CheckMainlineBootImageConfig(t, result)
} }

View file

@ -39,6 +39,78 @@ var PrepareForBootImageConfigTest = android.GroupFixturePreparers(
FixtureConfigureBootJars("com.android.art:core1", "com.android.art:core2", "platform:framework"), FixtureConfigureBootJars("com.android.art:core1", "com.android.art:core2", "platform:framework"),
) )
var PrepareApexBootJarConfigs = FixtureConfigureApexBootJars(
"com.android.foo:framework-foo", "com.android.bar:framework-bar")
var PrepareApexBootJarConfigsAndModules = android.GroupFixturePreparers(
PrepareApexBootJarConfigs,
prepareApexBootJarModule("com.android.foo", "framework-foo"),
prepareApexBootJarModule("com.android.bar", "framework-bar"),
)
var ApexBootJarFragmentsForPlatformBootclasspath = fmt.Sprintf(`
{
apex: "%[1]s",
module: "%[1]s-bootclasspathfragment",
},
{
apex: "%[2]s",
module: "%[2]s-bootclasspathfragment",
},
`, "com.android.foo", "com.android.bar")
var ApexBootJarDexJarPaths = []string{
"out/soong/.intermediates/packages/modules/com.android.bar/framework-bar/android_common_apex10000/aligned/framework-bar.jar",
"out/soong/.intermediates/packages/modules/com.android.foo/framework-foo/android_common_apex10000/aligned/framework-foo.jar",
}
func prepareApexBootJarModule(apexName string, moduleName string) android.FixturePreparer {
moduleSourceDir := fmt.Sprintf("packages/modules/%s", apexName)
return android.GroupFixturePreparers(
android.FixtureAddTextFile(moduleSourceDir+"/Android.bp", fmt.Sprintf(`
apex {
name: "%[1]s",
key: "%[1]s.key",
bootclasspath_fragments: [
"%[1]s-bootclasspathfragment",
],
updatable: false,
}
apex_key {
name: "%[1]s.key",
public_key: "%[1]s.avbpubkey",
private_key: "%[1]s.pem",
}
bootclasspath_fragment {
name: "%[1]s-bootclasspathfragment",
contents: ["%[2]s"],
apex_available: ["%[1]s"],
hidden_api: {
split_packages: ["*"],
},
}
java_library {
name: "%[2]s",
srcs: ["%[2]s.java"],
system_modules: "none",
sdk_version: "none",
compile_dex: true,
apex_available: ["%[1]s"],
}
`, apexName, moduleName)),
android.FixtureMergeMockFs(android.MockFS{
fmt.Sprintf("%s/apex_manifest.json", moduleSourceDir): nil,
fmt.Sprintf("%s/%s.avbpubkey", moduleSourceDir, apexName): nil,
fmt.Sprintf("%s/%s.pem", moduleSourceDir, apexName): nil,
fmt.Sprintf("system/sepolicy/apex/%s-file_contexts", apexName): nil,
fmt.Sprintf("%s/%s.java", moduleSourceDir, moduleName): nil,
}),
)
}
// normalizedInstall represents a android.RuleBuilderInstall that has been normalized to remove // normalizedInstall represents a android.RuleBuilderInstall that has been normalized to remove
// test specific parts of the From path. // test specific parts of the From path.
type normalizedInstall struct { type normalizedInstall struct {
@ -601,6 +673,290 @@ func checkFrameworkBootImageConfig(t *testing.T, result *android.TestResult, mut
checkBootImageConfig(t, imageConfig, mutated, expected) checkBootImageConfig(t, imageConfig, mutated, expected)
} }
// getMainlineImageConfig gets the framework bootImageConfig that was created during the test.
func getMainlineImageConfig(result *android.TestResult) *bootImageConfig {
pathCtx := &android.TestPathContext{TestResult: result}
imageConfig := mainlineBootImageConfig(pathCtx)
return imageConfig
}
// CheckMainlineBootImageConfig checks the status of the fields of the bootImageConfig and
// bootImageVariant structures that are returned from mainlineBootImageConfig.
//
// This is before any fields are mutated.
func CheckMainlineBootImageConfig(t *testing.T, result *android.TestResult) {
expectedLicenseMetadataFile := ""
imageConfig := getMainlineImageConfig(result)
expected := &expectedConfig{
name: "mainline",
stem: "boot",
dir: "out/soong/test_device/dex_mainlinejars",
symbolsDir: "out/soong/test_device/dex_mainlinejars_unstripped",
installDirOnDevice: "system/framework",
installDirOnHost: "system/framework",
profileInstallPathInApex: "",
modules: android.CreateTestConfiguredJarList([]string{
"com.android.foo:framework-foo",
"com.android.bar:framework-bar",
}),
dexPaths: []string{
"out/soong/test_device/dex_mainlinejars_input/framework-foo.jar",
"out/soong/test_device/dex_mainlinejars_input/framework-bar.jar",
},
dexPathsDeps: []string{
"out/soong/test_device/dex_artjars_input/core1.jar",
"out/soong/test_device/dex_artjars_input/core2.jar",
"out/soong/test_device/dex_bootjars_input/framework.jar",
"out/soong/test_device/dex_mainlinejars_input/framework-foo.jar",
"out/soong/test_device/dex_mainlinejars_input/framework-bar.jar",
},
zip: "out/soong/test_device/dex_mainlinejars/mainline.zip",
variants: []*expectedVariant{
{
archType: android.Arm64,
dexLocations: []string{
"/apex/com.android.foo/javalib/framework-foo.jar",
"/apex/com.android.bar/javalib/framework-bar.jar",
},
dexLocationsDeps: []string{
"/apex/com.android.art/javalib/core1.jar",
"/apex/com.android.art/javalib/core2.jar",
"/system/framework/framework.jar",
"/apex/com.android.foo/javalib/framework-foo.jar",
"/apex/com.android.bar/javalib/framework-bar.jar",
},
imagePathOnHost: "out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.art",
imagePathOnDevice: "/system/framework/arm64/boot-framework-foo.art",
imagesDeps: []string{
"out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.art",
"out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.oat",
"out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.vdex",
},
baseImages: []string{
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.art",
"out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.art",
},
baseImagesDeps: []string{
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.art",
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.oat",
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.vdex",
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.art",
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.oat",
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.vdex",
"out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.art",
"out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.oat",
"out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.vdex",
},
installs: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.art",
to: "/system/framework/arm64/boot-framework-foo.art",
},
{
from: "out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.oat",
to: "/system/framework/arm64/boot-framework-foo.oat",
},
},
vdexInstalls: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.vdex",
to: "/system/framework/arm64/boot-framework-foo.vdex",
},
},
unstrippedInstalls: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars_unstripped/android/system/framework/arm64/boot-framework-foo.oat",
to: "/system/framework/arm64/boot-framework-foo.oat",
},
},
licenseMetadataFile: expectedLicenseMetadataFile,
},
{
archType: android.Arm,
dexLocations: []string{
"/apex/com.android.foo/javalib/framework-foo.jar",
"/apex/com.android.bar/javalib/framework-bar.jar",
},
dexLocationsDeps: []string{
"/apex/com.android.art/javalib/core1.jar",
"/apex/com.android.art/javalib/core2.jar",
"/system/framework/framework.jar",
"/apex/com.android.foo/javalib/framework-foo.jar",
"/apex/com.android.bar/javalib/framework-bar.jar",
},
imagePathOnHost: "out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.art",
imagePathOnDevice: "/system/framework/arm/boot-framework-foo.art",
imagesDeps: []string{
"out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.art",
"out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.oat",
"out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.vdex",
},
baseImages: []string{
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.art",
"out/soong/test_device/dex_bootjars/android/system/framework/arm/boot-framework.art",
},
baseImagesDeps: []string{
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.art",
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.oat",
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.vdex",
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.art",
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.oat",
"out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.vdex",
"out/soong/test_device/dex_bootjars/android/system/framework/arm/boot-framework.art",
"out/soong/test_device/dex_bootjars/android/system/framework/arm/boot-framework.oat",
"out/soong/test_device/dex_bootjars/android/system/framework/arm/boot-framework.vdex",
},
installs: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.art",
to: "/system/framework/arm/boot-framework-foo.art",
},
{
from: "out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.oat",
to: "/system/framework/arm/boot-framework-foo.oat",
},
},
vdexInstalls: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.vdex",
to: "/system/framework/arm/boot-framework-foo.vdex",
},
},
unstrippedInstalls: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars_unstripped/android/system/framework/arm/boot-framework-foo.oat",
to: "/system/framework/arm/boot-framework-foo.oat",
},
},
licenseMetadataFile: expectedLicenseMetadataFile,
},
{
archType: android.X86_64,
dexLocations: []string{
"host/linux-x86/apex/com.android.foo/javalib/framework-foo.jar",
"host/linux-x86/apex/com.android.bar/javalib/framework-bar.jar",
},
dexLocationsDeps: []string{
"host/linux-x86/apex/com.android.art/javalib/core1.jar",
"host/linux-x86/apex/com.android.art/javalib/core2.jar",
"host/linux-x86/system/framework/framework.jar",
"host/linux-x86/apex/com.android.foo/javalib/framework-foo.jar",
"host/linux-x86/apex/com.android.bar/javalib/framework-bar.jar",
},
imagePathOnHost: "out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.art",
imagePathOnDevice: "/system/framework/x86_64/boot-framework-foo.art",
imagesDeps: []string{
"out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.art",
"out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.oat",
"out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.vdex",
},
baseImages: []string{
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86_64/boot.art",
"out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.art",
},
baseImagesDeps: []string{
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86_64/boot.art",
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86_64/boot.oat",
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86_64/boot.vdex",
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86_64/boot-core2.art",
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86_64/boot-core2.oat",
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86_64/boot-core2.vdex",
"out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.art",
"out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.oat",
"out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.vdex",
},
installs: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.art",
to: "/system/framework/x86_64/boot-framework-foo.art",
},
{
from: "out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.oat",
to: "/system/framework/x86_64/boot-framework-foo.oat",
},
},
vdexInstalls: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.vdex",
to: "/system/framework/x86_64/boot-framework-foo.vdex",
},
},
unstrippedInstalls: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars_unstripped/linux_glibc/system/framework/x86_64/boot-framework-foo.oat",
to: "/system/framework/x86_64/boot-framework-foo.oat",
},
},
licenseMetadataFile: expectedLicenseMetadataFile,
},
{
archType: android.X86,
dexLocations: []string{
"host/linux-x86/apex/com.android.foo/javalib/framework-foo.jar",
"host/linux-x86/apex/com.android.bar/javalib/framework-bar.jar",
},
dexLocationsDeps: []string{
"host/linux-x86/apex/com.android.art/javalib/core1.jar",
"host/linux-x86/apex/com.android.art/javalib/core2.jar",
"host/linux-x86/system/framework/framework.jar",
"host/linux-x86/apex/com.android.foo/javalib/framework-foo.jar",
"host/linux-x86/apex/com.android.bar/javalib/framework-bar.jar",
},
imagePathOnHost: "out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.art",
imagePathOnDevice: "/system/framework/x86/boot-framework-foo.art",
imagesDeps: []string{
"out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.art",
"out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.oat",
"out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.vdex",
},
baseImages: []string{
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.art",
"out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.art",
},
baseImagesDeps: []string{
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.art",
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.oat",
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.vdex",
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.art",
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.oat",
"out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.vdex",
"out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.art",
"out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.oat",
"out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.vdex",
},
installs: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.art",
to: "/system/framework/x86/boot-framework-foo.art",
},
{
from: "out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.oat",
to: "/system/framework/x86/boot-framework-foo.oat",
},
},
vdexInstalls: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.vdex",
to: "/system/framework/x86/boot-framework-foo.vdex",
},
},
unstrippedInstalls: []normalizedInstall{
{
from: "out/soong/test_device/dex_mainlinejars_unstripped/linux_glibc/system/framework/x86/boot-framework-foo.oat",
to: "/system/framework/x86/boot-framework-foo.oat",
},
},
licenseMetadataFile: expectedLicenseMetadataFile,
},
},
profileInstalls: []normalizedInstall{},
profileLicenseMetadataFile: expectedLicenseMetadataFile,
}
checkBootImageConfig(t, imageConfig, false, expected)
}
// clearMutatedFields clears fields in the expectedConfig that correspond to fields in the // clearMutatedFields clears fields in the expectedConfig that correspond to fields in the
// bootImageConfig/bootImageVariant structs which are mutated outside the call to // bootImageConfig/bootImageVariant structs which are mutated outside the call to
// genBootImageConfigs. // genBootImageConfigs.
@ -712,6 +1068,10 @@ DEXPREOPT_IMAGE_BUILT_INSTALLED_boot_arm=out/soong/test_device/dex_bootjars/andr
DEXPREOPT_IMAGE_BUILT_INSTALLED_boot_arm64=out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.art:/system/framework/arm64/boot-framework.art out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.oat:/system/framework/arm64/boot-framework.oat DEXPREOPT_IMAGE_BUILT_INSTALLED_boot_arm64=out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.art:/system/framework/arm64/boot-framework.art out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.oat:/system/framework/arm64/boot-framework.oat
DEXPREOPT_IMAGE_BUILT_INSTALLED_boot_host_x86=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.art:/system/framework/x86/boot-framework.art out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.oat:/system/framework/x86/boot-framework.oat DEXPREOPT_IMAGE_BUILT_INSTALLED_boot_host_x86=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.art:/system/framework/x86/boot-framework.art out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.oat:/system/framework/x86/boot-framework.oat
DEXPREOPT_IMAGE_BUILT_INSTALLED_boot_host_x86_64=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.art:/system/framework/x86_64/boot-framework.art out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.oat:/system/framework/x86_64/boot-framework.oat DEXPREOPT_IMAGE_BUILT_INSTALLED_boot_host_x86_64=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.art:/system/framework/x86_64/boot-framework.art out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.oat:/system/framework/x86_64/boot-framework.oat
DEXPREOPT_IMAGE_BUILT_INSTALLED_mainline_arm=out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.art:/system/framework/arm/boot-framework-foo.art out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.oat:/system/framework/arm/boot-framework-foo.oat
DEXPREOPT_IMAGE_BUILT_INSTALLED_mainline_arm64=out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.art:/system/framework/arm64/boot-framework-foo.art out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.oat:/system/framework/arm64/boot-framework-foo.oat
DEXPREOPT_IMAGE_BUILT_INSTALLED_mainline_host_x86=out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.art:/system/framework/x86/boot-framework-foo.art out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.oat:/system/framework/x86/boot-framework-foo.oat
DEXPREOPT_IMAGE_BUILT_INSTALLED_mainline_host_x86_64=out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.art:/system/framework/x86_64/boot-framework-foo.art out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.oat:/system/framework/x86_64/boot-framework-foo.oat
DEXPREOPT_IMAGE_DEPS_art_arm=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.art out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.oat out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.vdex out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.art out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.oat out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.vdex DEXPREOPT_IMAGE_DEPS_art_arm=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.art out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.oat out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.vdex out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.art out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.oat out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.vdex
DEXPREOPT_IMAGE_DEPS_art_arm64=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.art out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.oat out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.vdex out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.art out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.oat out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.vdex DEXPREOPT_IMAGE_DEPS_art_arm64=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.art out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.oat out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.vdex out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.art out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.oat out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.vdex
DEXPREOPT_IMAGE_DEPS_art_host_x86=out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.art out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.oat out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.vdex out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.art out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.oat out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.vdex DEXPREOPT_IMAGE_DEPS_art_host_x86=out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.art out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.oat out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.vdex out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.art out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.oat out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.vdex
@ -720,6 +1080,10 @@ DEXPREOPT_IMAGE_DEPS_boot_arm=out/soong/test_device/dex_bootjars/android/system/
DEXPREOPT_IMAGE_DEPS_boot_arm64=out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.art out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.oat out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.vdex DEXPREOPT_IMAGE_DEPS_boot_arm64=out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.art out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.oat out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.vdex
DEXPREOPT_IMAGE_DEPS_boot_host_x86=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.art out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.oat out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.vdex DEXPREOPT_IMAGE_DEPS_boot_host_x86=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.art out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.oat out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.vdex
DEXPREOPT_IMAGE_DEPS_boot_host_x86_64=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.art out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.oat out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.vdex DEXPREOPT_IMAGE_DEPS_boot_host_x86_64=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.art out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.oat out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.vdex
DEXPREOPT_IMAGE_DEPS_mainline_arm=out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.art out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.oat out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.vdex
DEXPREOPT_IMAGE_DEPS_mainline_arm64=out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.art out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.oat out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.vdex
DEXPREOPT_IMAGE_DEPS_mainline_host_x86=out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.art out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.oat out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.vdex
DEXPREOPT_IMAGE_DEPS_mainline_host_x86_64=out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.art out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.oat out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.vdex
DEXPREOPT_IMAGE_LICENSE_METADATA_art_arm=%[1]s DEXPREOPT_IMAGE_LICENSE_METADATA_art_arm=%[1]s
DEXPREOPT_IMAGE_LICENSE_METADATA_art_arm64=%[1]s DEXPREOPT_IMAGE_LICENSE_METADATA_art_arm64=%[1]s
DEXPREOPT_IMAGE_LICENSE_METADATA_art_host_x86=%[1]s DEXPREOPT_IMAGE_LICENSE_METADATA_art_host_x86=%[1]s
@ -728,11 +1092,17 @@ DEXPREOPT_IMAGE_LICENSE_METADATA_boot_arm=out/soong/.intermediates/frameworks/ba
DEXPREOPT_IMAGE_LICENSE_METADATA_boot_arm64=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic DEXPREOPT_IMAGE_LICENSE_METADATA_boot_arm64=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic
DEXPREOPT_IMAGE_LICENSE_METADATA_boot_host_x86=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic DEXPREOPT_IMAGE_LICENSE_METADATA_boot_host_x86=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic
DEXPREOPT_IMAGE_LICENSE_METADATA_boot_host_x86_64=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic DEXPREOPT_IMAGE_LICENSE_METADATA_boot_host_x86_64=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic
DEXPREOPT_IMAGE_LICENSE_METADATA_mainline_arm=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic
DEXPREOPT_IMAGE_LICENSE_METADATA_mainline_arm64=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic
DEXPREOPT_IMAGE_LICENSE_METADATA_mainline_host_x86=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic
DEXPREOPT_IMAGE_LICENSE_METADATA_mainline_host_x86_64=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic
DEXPREOPT_IMAGE_LOCATIONS_ON_DEVICEart=/system/framework/boot.art DEXPREOPT_IMAGE_LOCATIONS_ON_DEVICEart=/system/framework/boot.art
DEXPREOPT_IMAGE_LOCATIONS_ON_DEVICEboot=/system/framework/boot.art:/system/framework/boot-framework.art DEXPREOPT_IMAGE_LOCATIONS_ON_DEVICEboot=/system/framework/boot.art:/system/framework/boot-framework.art
DEXPREOPT_IMAGE_LOCATIONS_ON_DEVICEmainline=/system/framework/boot.art:/system/framework/boot-framework.art:/system/framework/boot-framework-foo.art
DEXPREOPT_IMAGE_LOCATIONS_ON_HOSTart=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/boot.art DEXPREOPT_IMAGE_LOCATIONS_ON_HOSTart=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/boot.art
DEXPREOPT_IMAGE_LOCATIONS_ON_HOSTboot=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/boot.art:out/soong/test_device/dex_bootjars/android/system/framework/boot-framework.art DEXPREOPT_IMAGE_LOCATIONS_ON_HOSTboot=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/boot.art:out/soong/test_device/dex_bootjars/android/system/framework/boot-framework.art
DEXPREOPT_IMAGE_NAMES=art boot DEXPREOPT_IMAGE_LOCATIONS_ON_HOSTmainline=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/boot.art:out/soong/test_device/dex_bootjars/android/system/framework/boot-framework.art:out/soong/test_device/dex_mainlinejars/android/system/framework/boot-framework-foo.art
DEXPREOPT_IMAGE_NAMES=art boot mainline
DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED=out/soong/test_device/dex_bootjars/boot.bprof:/system/etc/boot-image.bprof out/soong/test_device/dex_bootjars/boot.prof:/system/etc/boot-image.prof DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED=out/soong/test_device/dex_bootjars/boot.bprof:/system/etc/boot-image.bprof out/soong/test_device/dex_bootjars/boot.prof:/system/etc/boot-image.prof
DEXPREOPT_IMAGE_PROFILE_LICENSE_METADATA=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic DEXPREOPT_IMAGE_PROFILE_LICENSE_METADATA=out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic
DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_art_arm=out/soong/test_device/dex_artjars_unstripped/android/apex/art_boot_images/javalib/arm/boot.oat:/apex/art_boot_images/javalib/arm/boot.oat out/soong/test_device/dex_artjars_unstripped/android/apex/art_boot_images/javalib/arm/boot-core2.oat:/apex/art_boot_images/javalib/arm/boot-core2.oat DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_art_arm=out/soong/test_device/dex_artjars_unstripped/android/apex/art_boot_images/javalib/arm/boot.oat:/apex/art_boot_images/javalib/arm/boot.oat out/soong/test_device/dex_artjars_unstripped/android/apex/art_boot_images/javalib/arm/boot-core2.oat:/apex/art_boot_images/javalib/arm/boot-core2.oat
@ -743,6 +1113,10 @@ DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_boot_arm=out/soong/test_device/dex_bo
DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_boot_arm64=out/soong/test_device/dex_bootjars_unstripped/android/system/framework/arm64/boot-framework.oat:/system/framework/arm64/boot-framework.oat DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_boot_arm64=out/soong/test_device/dex_bootjars_unstripped/android/system/framework/arm64/boot-framework.oat:/system/framework/arm64/boot-framework.oat
DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_boot_host_x86=out/soong/test_device/dex_bootjars_unstripped/linux_glibc/system/framework/x86/boot-framework.oat:/system/framework/x86/boot-framework.oat DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_boot_host_x86=out/soong/test_device/dex_bootjars_unstripped/linux_glibc/system/framework/x86/boot-framework.oat:/system/framework/x86/boot-framework.oat
DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_boot_host_x86_64=out/soong/test_device/dex_bootjars_unstripped/linux_glibc/system/framework/x86_64/boot-framework.oat:/system/framework/x86_64/boot-framework.oat DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_boot_host_x86_64=out/soong/test_device/dex_bootjars_unstripped/linux_glibc/system/framework/x86_64/boot-framework.oat:/system/framework/x86_64/boot-framework.oat
DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_mainline_arm=out/soong/test_device/dex_mainlinejars_unstripped/android/system/framework/arm/boot-framework-foo.oat:/system/framework/arm/boot-framework-foo.oat
DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_mainline_arm64=out/soong/test_device/dex_mainlinejars_unstripped/android/system/framework/arm64/boot-framework-foo.oat:/system/framework/arm64/boot-framework-foo.oat
DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_mainline_host_x86=out/soong/test_device/dex_mainlinejars_unstripped/linux_glibc/system/framework/x86/boot-framework-foo.oat:/system/framework/x86/boot-framework-foo.oat
DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_mainline_host_x86_64=out/soong/test_device/dex_mainlinejars_unstripped/linux_glibc/system/framework/x86_64/boot-framework-foo.oat:/system/framework/x86_64/boot-framework-foo.oat
DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_art_arm=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.vdex:/apex/art_boot_images/javalib/arm/boot.vdex out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.vdex:/apex/art_boot_images/javalib/arm/boot-core2.vdex DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_art_arm=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.vdex:/apex/art_boot_images/javalib/arm/boot.vdex out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot-core2.vdex:/apex/art_boot_images/javalib/arm/boot-core2.vdex
DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_art_arm64=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.vdex:/apex/art_boot_images/javalib/arm64/boot.vdex out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.vdex:/apex/art_boot_images/javalib/arm64/boot-core2.vdex DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_art_arm64=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.vdex:/apex/art_boot_images/javalib/arm64/boot.vdex out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot-core2.vdex:/apex/art_boot_images/javalib/arm64/boot-core2.vdex
DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_art_host_x86=out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.vdex:/apex/art_boot_images/javalib/x86/boot.vdex out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.vdex:/apex/art_boot_images/javalib/x86/boot-core2.vdex DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_art_host_x86=out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.vdex:/apex/art_boot_images/javalib/x86/boot.vdex out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot-core2.vdex:/apex/art_boot_images/javalib/x86/boot-core2.vdex
@ -751,8 +1125,13 @@ DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_boot_arm=out/soong/test_device/dex_bootjars
DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_boot_arm64=out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.vdex:/system/framework/arm64/boot-framework.vdex DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_boot_arm64=out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.vdex:/system/framework/arm64/boot-framework.vdex
DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_boot_host_x86=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.vdex:/system/framework/x86/boot-framework.vdex DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_boot_host_x86=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.vdex:/system/framework/x86/boot-framework.vdex
DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_boot_host_x86_64=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.vdex:/system/framework/x86_64/boot-framework.vdex DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_boot_host_x86_64=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.vdex:/system/framework/x86_64/boot-framework.vdex
DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_mainline_arm=out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.vdex:/system/framework/arm/boot-framework-foo.vdex
DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_mainline_arm64=out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.vdex:/system/framework/arm64/boot-framework-foo.vdex
DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_mainline_host_x86=out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.vdex:/system/framework/x86/boot-framework-foo.vdex
DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_mainline_host_x86_64=out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.vdex:/system/framework/x86_64/boot-framework-foo.vdex
DEXPREOPT_IMAGE_ZIP_art=out/soong/test_device/dex_artjars/art.zip DEXPREOPT_IMAGE_ZIP_art=out/soong/test_device/dex_artjars/art.zip
DEXPREOPT_IMAGE_ZIP_boot=out/soong/test_device/dex_bootjars/boot.zip DEXPREOPT_IMAGE_ZIP_boot=out/soong/test_device/dex_bootjars/boot.zip
DEXPREOPT_IMAGE_ZIP_mainline=out/soong/test_device/dex_mainlinejars/mainline.zip
DEXPREOPT_IMAGE_art_arm=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.art DEXPREOPT_IMAGE_art_arm=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm/boot.art
DEXPREOPT_IMAGE_art_arm64=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.art DEXPREOPT_IMAGE_art_arm64=out/soong/test_device/dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.art
DEXPREOPT_IMAGE_art_host_x86=out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.art DEXPREOPT_IMAGE_art_host_x86=out/soong/test_device/dex_artjars/linux_glibc/apex/art_boot_images/javalib/x86/boot.art
@ -761,6 +1140,10 @@ DEXPREOPT_IMAGE_boot_arm=out/soong/test_device/dex_bootjars/android/system/frame
DEXPREOPT_IMAGE_boot_arm64=out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.art DEXPREOPT_IMAGE_boot_arm64=out/soong/test_device/dex_bootjars/android/system/framework/arm64/boot-framework.art
DEXPREOPT_IMAGE_boot_host_x86=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.art DEXPREOPT_IMAGE_boot_host_x86=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86/boot-framework.art
DEXPREOPT_IMAGE_boot_host_x86_64=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.art DEXPREOPT_IMAGE_boot_host_x86_64=out/soong/test_device/dex_bootjars/linux_glibc/system/framework/x86_64/boot-framework.art
DEXPREOPT_IMAGE_mainline_arm=out/soong/test_device/dex_mainlinejars/android/system/framework/arm/boot-framework-foo.art
DEXPREOPT_IMAGE_mainline_arm64=out/soong/test_device/dex_mainlinejars/android/system/framework/arm64/boot-framework-foo.art
DEXPREOPT_IMAGE_mainline_host_x86=out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86/boot-framework-foo.art
DEXPREOPT_IMAGE_mainline_host_x86_64=out/soong/test_device/dex_mainlinejars/linux_glibc/system/framework/x86_64/boot-framework-foo.art
` `
expected := strings.TrimSpace(fmt.Sprintf(format, expectedLicenseMetadataFile)) expected := strings.TrimSpace(fmt.Sprintf(format, expectedLicenseMetadataFile))
actual := strings.TrimSpace(out.String()) actual := strings.TrimSpace(out.String())

View file

@ -414,6 +414,7 @@ func (b *platformBootclasspathModule) generateBootImageBuildActions(ctx android.
frameworkBootImageConfig := defaultBootImageConfig(ctx) frameworkBootImageConfig := defaultBootImageConfig(ctx)
bootFrameworkProfileRule(ctx, frameworkBootImageConfig) bootFrameworkProfileRule(ctx, frameworkBootImageConfig)
b.generateBootImage(ctx, frameworkBootImageName, platformModules) b.generateBootImage(ctx, frameworkBootImageName, platformModules)
b.generateBootImage(ctx, mainlineBootImageName, apexModules)
b.copyApexBootJarsForAppsDexpreopt(ctx, apexModules) b.copyApexBootJarsForAppsDexpreopt(ctx, apexModules)
dumpOatRules(ctx, frameworkBootImageConfig) dumpOatRules(ctx, frameworkBootImageConfig)
} }

View file

@ -27,6 +27,11 @@ import (
// fixtureAddPlatformBootclasspathForBootclasspathFragment adds a platform_bootclasspath module that // fixtureAddPlatformBootclasspathForBootclasspathFragment adds a platform_bootclasspath module that
// references the bootclasspath fragment. // references the bootclasspath fragment.
func fixtureAddPlatformBootclasspathForBootclasspathFragment(apex, fragment string) android.FixturePreparer { func fixtureAddPlatformBootclasspathForBootclasspathFragment(apex, fragment string) android.FixturePreparer {
return fixtureAddPlatformBootclasspathForBootclasspathFragmentWithExtra(apex, fragment, "")
}
// fixtureAddPlatformBootclasspathForBootclasspathFragmentWithExtra is the same as above, but also adds extra fragments.
func fixtureAddPlatformBootclasspathForBootclasspathFragmentWithExtra(apex, fragment, extraFragments string) android.FixturePreparer {
return android.GroupFixturePreparers( return android.GroupFixturePreparers(
// Add a platform_bootclasspath module. // Add a platform_bootclasspath module.
android.FixtureAddTextFile("frameworks/base/boot/Android.bp", fmt.Sprintf(` android.FixtureAddTextFile("frameworks/base/boot/Android.bp", fmt.Sprintf(`
@ -37,9 +42,10 @@ func fixtureAddPlatformBootclasspathForBootclasspathFragment(apex, fragment stri
apex: "%s", apex: "%s",
module: "%s", module: "%s",
}, },
%s
], ],
} }
`, apex, fragment)), `, apex, fragment, extraFragments)),
android.FixtureAddFile("frameworks/base/config/boot-profile.txt", nil), android.FixtureAddFile("frameworks/base/config/boot-profile.txt", nil),
android.FixtureAddFile("frameworks/base/config/boot-image-profile.txt", nil), android.FixtureAddFile("frameworks/base/config/boot-image-profile.txt", nil),
android.FixtureAddFile("build/soong/scripts/check_boot_jars/package_allowed_list.txt", nil), android.FixtureAddFile("build/soong/scripts/check_boot_jars/package_allowed_list.txt", nil),
@ -79,9 +85,11 @@ func TestSnapshotWithBootclasspathFragment_ImageName(t *testing.T) {
}), }),
// Add a platform_bootclasspath that depends on the fragment. // Add a platform_bootclasspath that depends on the fragment.
fixtureAddPlatformBootclasspathForBootclasspathFragment("com.android.art", "mybootclasspathfragment"), fixtureAddPlatformBootclasspathForBootclasspathFragmentWithExtra(
"com.android.art", "mybootclasspathfragment", java.ApexBootJarFragmentsForPlatformBootclasspath),
java.PrepareForBootImageConfigTest, java.PrepareForBootImageConfigTest,
java.PrepareApexBootJarConfigsAndModules,
android.FixtureWithRootAndroidBp(` android.FixtureWithRootAndroidBp(`
sdk { sdk {
name: "mysdk", name: "mysdk",
@ -196,9 +204,15 @@ java_import {
snapshotTestChecker(checkSnapshotWithoutSource, func(t *testing.T, result *android.TestResult) { snapshotTestChecker(checkSnapshotWithoutSource, func(t *testing.T, result *android.TestResult) {
// Make sure that the boot jars package check rule includes the dex jars retrieved from the prebuilt apex. // Make sure that the boot jars package check rule includes the dex jars retrieved from the prebuilt apex.
checkBootJarsPackageCheckRule(t, result, checkBootJarsPackageCheckRule(t, result,
"out/soong/.intermediates/prebuilts/apex/com.android.art.deapexer/android_common/deapexer/javalib/core1.jar", append(
"out/soong/.intermediates/prebuilts/apex/com.android.art.deapexer/android_common/deapexer/javalib/core2.jar", []string{
"out/soong/.intermediates/default/java/framework/android_common/aligned/framework.jar") "out/soong/.intermediates/prebuilts/apex/com.android.art.deapexer/android_common/deapexer/javalib/core1.jar",
"out/soong/.intermediates/prebuilts/apex/com.android.art.deapexer/android_common/deapexer/javalib/core2.jar",
"out/soong/.intermediates/default/java/framework/android_common/aligned/framework.jar",
},
java.ApexBootJarDexJarPaths...,
)...,
)
java.CheckMutatedArtBootImageConfig(t, result, "out/soong/.intermediates/snapshot/mybootclasspathfragment/android_common_com.android.art/meta_lic") java.CheckMutatedArtBootImageConfig(t, result, "out/soong/.intermediates/snapshot/mybootclasspathfragment/android_common_com.android.art/meta_lic")
java.CheckMutatedFrameworkBootImageConfig(t, result, "out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic") java.CheckMutatedFrameworkBootImageConfig(t, result, "out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/meta_lic")
}), }),
@ -222,9 +236,15 @@ java_import {
// Make sure that the boot jars package check rule includes the dex jars created from the source. // Make sure that the boot jars package check rule includes the dex jars created from the source.
checkBootJarsPackageCheckRule(t, result, checkBootJarsPackageCheckRule(t, result,
"out/soong/.intermediates/core1/android_common_apex10000/aligned/core1.jar", append(
"out/soong/.intermediates/core2/android_common_apex10000/aligned/core2.jar", []string{
"out/soong/.intermediates/default/java/framework/android_common/aligned/framework.jar") "out/soong/.intermediates/core1/android_common_apex10000/aligned/core1.jar",
"out/soong/.intermediates/core2/android_common_apex10000/aligned/core2.jar",
"out/soong/.intermediates/default/java/framework/android_common/aligned/framework.jar",
},
java.ApexBootJarDexJarPaths...,
)...,
)
} }
// checkBootJarsPackageCheckRule checks that the supplied module is an input to the boot jars // checkBootJarsPackageCheckRule checks that the supplied module is an input to the boot jars