summaryrefslogtreecommitdiff
path: root/apex/bootclasspath_fragment_test.go
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2021-11-26 18:09:27 +0000
committer Jiakai Zhang <jiakaiz@google.com> 2021-12-03 20:02:10 +0000
commit49b1eb6b045156c6481df584fdd21348a9df3383 (patch)
tree5d06908972d9bc95bcc587bd658351ae11d2c860 /apex/bootclasspath_fragment_test.go
parent7c721018bba97bd2134b35ca8b851478530f2953 (diff)
Add ART boot image profile to the ART APEX.
We will need the profile when we generate the primary boot image on device. Bug: 203492478 Test: Run `banchan com.android.art x86_64 && m` and see `$ANDROID_PRODUCT_OUT/apex/com.android.art/etc/boot-image.prof`. Test: Run `lunch aosp_cf_x86_64_phone-userdebug && m` and see both `$ANDROID_PRODUCT_OUT/apex/com.android.art/etc/boot-image.prof` and `$ANDROID_PRODUCT_OUT/system/etc/boot-image.prof`, in different sizes. Test: Start Cuttlefish with the built image and see both `/apex/com.android.art/etc/boot-image.prof` and `/system/etc/boot-image.prof` on device. Change-Id: Id879dc49b234133dfbb9563814328661a1f4a6c0
Diffstat (limited to 'apex/bootclasspath_fragment_test.go')
-rw-r--r--apex/bootclasspath_fragment_test.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/apex/bootclasspath_fragment_test.go b/apex/bootclasspath_fragment_test.go
index cb7d3d113..9e030f10c 100644
--- a/apex/bootclasspath_fragment_test.go
+++ b/apex/bootclasspath_fragment_test.go
@@ -21,6 +21,7 @@ import (
"testing"
"android/soong/android"
+ "android/soong/dexpreopt"
"android/soong/java"
"github.com/google/blueprint/proptools"
@@ -35,11 +36,14 @@ var prepareForTestWithBootclasspathFragment = android.GroupFixturePreparers(
)
// Some additional files needed for the art apex.
-var prepareForTestWithArtApex = android.FixtureMergeMockFs(android.MockFS{
- "com.android.art.avbpubkey": nil,
- "com.android.art.pem": nil,
- "system/sepolicy/apex/com.android.art-file_contexts": nil,
-})
+var prepareForTestWithArtApex = android.GroupFixturePreparers(
+ android.FixtureMergeMockFs(android.MockFS{
+ "com.android.art.avbpubkey": nil,
+ "com.android.art.pem": nil,
+ "system/sepolicy/apex/com.android.art-file_contexts": nil,
+ }),
+ dexpreopt.FixtureSetBootImageProfiles("art/build/boot/boot-image-profile.txt"),
+)
func TestBootclasspathFragments(t *testing.T) {
result := android.GroupFixturePreparers(
@@ -408,6 +412,7 @@ func TestBootclasspathFragmentInArtApex(t *testing.T) {
).RunTest(t)
ensureExactContents(t, result.TestContext, "com.android.art", "android_common_com.android.art_image", []string{
+ "etc/boot-image.prof",
"etc/classpaths/bootclasspath.pb",
"javalib/arm/boot.art",
"javalib/arm/boot.oat",
@@ -451,6 +456,7 @@ func TestBootclasspathFragmentInArtApex(t *testing.T) {
).RunTest(t)
ensureExactContents(t, result.TestContext, "com.android.art", "android_common_com.android.art_image", []string{
+ "etc/boot-image.prof",
"etc/classpaths/bootclasspath.pb",
"javalib/arm/boot.art",
"javalib/arm/boot.oat",