summaryrefslogtreecommitdiff
path: root/apex/bootclasspath_fragment_test.go
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2023-05-02 14:35:44 +0100
committer Jiakai Zhang <jiakaiz@google.com> 2023-05-03 15:25:18 +0100
commitb95f8345c8b926035e5ed40c903f056cd106c539 (patch)
treedea5843baa19eff63513a2e2b04c628c1ad0bf87 /apex/bootclasspath_fragment_test.go
parent05d4d901146d96634ad0ff3a9982c9c87c394f18 (diff)
Generate boot image profiles even if dexpreopt is disabled.
Bug: 280440941 Test: - 1. Patch ag/22302622 to disable dexpreopt. 2. See boot image profiles still generated. Change-Id: I1bf05ade53fa83f3dba46f28a8f9246ba1fdf664
Diffstat (limited to 'apex/bootclasspath_fragment_test.go')
-rw-r--r--apex/bootclasspath_fragment_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/apex/bootclasspath_fragment_test.go b/apex/bootclasspath_fragment_test.go
index 2ddfd0305..4a661d4ea 100644
--- a/apex/bootclasspath_fragment_test.go
+++ b/apex/bootclasspath_fragment_test.go
@@ -497,6 +497,26 @@ func TestBootclasspathFragmentInArtApex(t *testing.T) {
})
})
+ t.Run("generate boot image profile even if dexpreopt is disabled", func(t *testing.T) {
+ result := android.GroupFixturePreparers(
+ commonPreparer,
+
+ // Configure some libraries in the art bootclasspath_fragment that match the source
+ // bootclasspath_fragment's contents property.
+ java.FixtureConfigureBootJars("com.android.art:foo", "com.android.art:bar"),
+ addSource("foo", "bar"),
+ java.FixtureSetBootImageInstallDirOnDevice("art", "system/framework"),
+ dexpreopt.FixtureDisableDexpreoptBootImages(true),
+ ).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/bar.jar",
+ "javalib/foo.jar",
+ })
+ })
+
t.Run("boot image disable generate profile", func(t *testing.T) {
result := android.GroupFixturePreparers(
commonPreparer,