Add a Make variable to determine ART boot image jars for testing.

Bug: 290583827
Test: m nothing
Change-Id: I6eb0c83dd14682905ebaf3af55171856300eb2e3
This commit is contained in:
Jiakai Zhang
2023-07-12 16:51:57 +01:00
parent 4d90da29a8
commit 556bdf8e96
5 changed files with 127 additions and 31 deletions

View File

@@ -45,7 +45,8 @@ type GlobalConfig struct {
BootJars android.ConfiguredJarList // modules for jars that form the boot class path
ApexBootJars android.ConfiguredJarList // jars within apex that form the boot class path
ArtApexJars android.ConfiguredJarList // modules for jars that are in the ART APEX
ArtApexJars android.ConfiguredJarList // modules for jars that are in the ART APEX
TestOnlyArtBootImageJars android.ConfiguredJarList // modules for jars to be included in the ART boot image for testing
SystemServerJars android.ConfiguredJarList // system_server classpath jars on the platform
SystemServerApps []string // apps that are loaded into system server
@@ -700,6 +701,7 @@ func GlobalConfigForTests(ctx android.PathContext) *GlobalConfig {
BootJars: android.EmptyConfiguredJarList(),
ApexBootJars: android.EmptyConfiguredJarList(),
ArtApexJars: android.EmptyConfiguredJarList(),
TestOnlyArtBootImageJars: android.EmptyConfiguredJarList(),
SystemServerJars: android.EmptyConfiguredJarList(),
SystemServerApps: nil,
ApexSystemServerJars: android.EmptyConfiguredJarList(),

View File

@@ -111,6 +111,13 @@ func FixtureSetArtBootJars(bootJars ...string) android.FixturePreparer {
})
}
// FixtureSetTestOnlyArtBootImageJars enables dexpreopt and sets the TestOnlyArtBootImageJars property.
func FixtureSetTestOnlyArtBootImageJars(bootJars ...string) android.FixturePreparer {
return FixtureModifyGlobalConfig(func(_ android.PathContext, dexpreoptConfig *GlobalConfig) {
dexpreoptConfig.TestOnlyArtBootImageJars = android.CreateTestConfiguredJarList(bootJars)
})
}
// FixtureSetBootJars enables dexpreopt and sets the BootJars property.
func FixtureSetBootJars(bootJars ...string) android.FixturePreparer {
return FixtureModifyGlobalConfig(func(_ android.PathContext, dexpreoptConfig *GlobalConfig) {