diff options
| author | Jiakai Zhang <jiakaiz@google.com> | 2023-07-12 16:51:57 +0100 |
|---|---|---|
| committer | Jiakai Zhang <jiakaiz@google.com> | 2023-07-14 12:13:30 +0100 |
| commit | 556bdf8e965f1db04ec9862b590aad2d065e9bec (patch) | |
| tree | aed7ba34419caf8a43fa76f443dca5c00e9f9f73 /dexpreopt | |
| parent | 4d90da29a887f8919a0ad931d2045814e9e5ac65 (diff) | |
Add a Make variable to determine ART boot image jars for testing.
Bug: 290583827
Test: m nothing
Change-Id: I6eb0c83dd14682905ebaf3af55171856300eb2e3
Diffstat (limited to 'dexpreopt')
| -rw-r--r-- | dexpreopt/config.go | 4 | ||||
| -rw-r--r-- | dexpreopt/testing.go | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/dexpreopt/config.go b/dexpreopt/config.go index bb83dc842..ba41f4a66 100644 --- a/dexpreopt/config.go +++ b/dexpreopt/config.go @@ -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(), diff --git a/dexpreopt/testing.go b/dexpreopt/testing.go index 6ed0736f7..147a56231 100644 --- a/dexpreopt/testing.go +++ b/dexpreopt/testing.go @@ -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) { |
