Dexpreopt ART jars and framework jars together.

Bug: 280776428
Test: atest art_standalone_dexpreopt_tests
Test: -
  1. m
  2. Check .invocation file (http://gpaste/6498044089466880)
  3. Check files in $ANDROID_PRODUCT_OUT/system/framework/x86_64
Test: -
  1. m dist
  2. Check files in out/dist/boot.zip
Test: -
  1. art/tools/buildbot-build.sh --host
  2. m test-art-host-gtest
  3. art/test/testrunner/testrunner.py --host
Test: m build-art-target-golem
(cherry picked from https://android-review.googlesource.com/q/commit:c08c162b5a82ddfc44e9944d798636b2241308de)
Merged-In: I89490252e56a05edab03fdddc6539fa4d7f79756
Change-Id: I89490252e56a05edab03fdddc6539fa4d7f79756
This commit is contained in:
Jiakai Zhang
2023-05-10 18:38:34 +01:00
committed by Cherrypicker Worker
parent 7ba1ca0ac3
commit 5f5a17fd6b
7 changed files with 520 additions and 170 deletions

View File

@@ -8289,8 +8289,8 @@ func TestNoUpdatableJarsInBootImage(t *testing.T) {
testNoUpdatableJarsInBootImage(t, "", preparer, fragments...)
})
t.Run("updatable jar from ART apex in the framework boot image => error", func(t *testing.T) {
err := `module "some-art-lib" from updatable apexes \["com.android.art.debug"\] is not allowed in the framework boot image`
t.Run("updatable jar from ART apex in the platform bootclasspath => error", func(t *testing.T) {
err := `module "some-art-lib" from updatable apexes \["com.android.art.debug"\] is not allowed in the platform bootclasspath`
// Update the dexpreopt BootJars directly.
preparer := android.GroupFixturePreparers(
prepareSetBootJars("com.android.art.debug:some-art-lib"),
@@ -8313,8 +8313,8 @@ func TestNoUpdatableJarsInBootImage(t *testing.T) {
testNoUpdatableJarsInBootImage(t, err, preparer)
})
t.Run("updatable jar from some other apex in the framework boot image => error", func(t *testing.T) {
err := `module "some-updatable-apex-lib" from updatable apexes \["some-updatable-apex"\] is not allowed in the framework boot image`
t.Run("updatable jar from some other apex in the platform bootclasspath => error", func(t *testing.T) {
err := `module "some-updatable-apex-lib" from updatable apexes \["some-updatable-apex"\] is not allowed in the platform bootclasspath`
preparer := android.GroupFixturePreparers(
java.FixtureConfigureBootJars("some-updatable-apex:some-updatable-apex-lib"),
java.FixtureConfigureApexBootJars("some-non-updatable-apex:some-non-updatable-apex-lib"),
@@ -8322,7 +8322,7 @@ func TestNoUpdatableJarsInBootImage(t *testing.T) {
testNoUpdatableJarsInBootImage(t, err, preparer)
})
t.Run("non-updatable jar from some other apex in the framework boot image => ok", func(t *testing.T) {
t.Run("non-updatable jar from some other apex in the platform bootclasspath => ok", func(t *testing.T) {
preparer := java.FixtureConfigureApexBootJars("some-non-updatable-apex:some-non-updatable-apex-lib")
fragment := java.ApexVariantReference{
Apex: proptools.StringPtr("some-non-updatable-apex"),
@@ -8337,7 +8337,7 @@ func TestNoUpdatableJarsInBootImage(t *testing.T) {
testNoUpdatableJarsInBootImage(t, err, preparer)
})
t.Run("nonexistent jar in the framework boot image => error", func(t *testing.T) {
t.Run("nonexistent jar in the platform bootclasspath => error", func(t *testing.T) {
err := `"platform-bootclasspath" depends on undefined module "nonexistent"`
preparer := java.FixtureConfigureBootJars("platform:nonexistent")
testNoUpdatableJarsInBootImage(t, err, preparer)
@@ -8350,7 +8350,7 @@ func TestNoUpdatableJarsInBootImage(t *testing.T) {
testNoUpdatableJarsInBootImage(t, err, preparer)
})
t.Run("platform jar in the framework boot image => ok", func(t *testing.T) {
t.Run("platform jar in the platform bootclasspath => ok", func(t *testing.T) {
preparer := android.GroupFixturePreparers(
java.FixtureConfigureBootJars("platform:some-platform-lib"),
java.FixtureConfigureApexBootJars("some-non-updatable-apex:some-non-updatable-apex-lib"),