summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment_test.go
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2023-07-11 14:31:22 +0100
committer Jiakai Zhang <jiakaiz@google.com> 2023-07-11 15:29:12 +0100
commitb69e89559fe02bcd010f25c3cf2449d30200a761 (patch)
tree454e88d6b750c7e5607c2d301a8837189f2291b8 /java/bootclasspath_fragment_test.go
parentbc332f6cd8e8eaf9963ece86912c78f004775bdc (diff)
Fix some tests for dexpreopt and remove unnecessary tests.
This CL is to prepare for the changes in http://r.android.com/2652081. See the description of that CL for the reasons. Some tests were set up in a fragile way and were easy to be broken when the implementation changes. This CL is a pure test change that fixes them. This CL also removes TestNoUpdatableJarsInBootImage. That test checks what should go to the ART boot image and what should go to the platform one, which does not apply today because boot images are not associated with mainline modules anymore: a boot image may take jars from multiple mainline modules and the platform, and a mainline module can contribute to multiple boot images. In practice, we have ART jars in the platform boot image, and we are going to add core-icu4j and consrypt to the ART boot image, which is now for testing only. Bug: 290583827 Test: m nothing Change-Id: I22c45cbf6f853b030b68edb51197854e9c53a02e
Diffstat (limited to 'java/bootclasspath_fragment_test.go')
-rw-r--r--java/bootclasspath_fragment_test.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/java/bootclasspath_fragment_test.go b/java/bootclasspath_fragment_test.go
index 2541f14ff..888caad16 100644
--- a/java/bootclasspath_fragment_test.go
+++ b/java/bootclasspath_fragment_test.go
@@ -40,6 +40,12 @@ func TestBootclasspathFragment_UnknownImageName(t *testing.T) {
image_name: "unknown",
contents: ["foo"],
}
+
+ java_library {
+ name: "foo",
+ srcs: ["foo.java"],
+ installable: true,
+ }
`)
}
@@ -53,6 +59,11 @@ func TestPrebuiltBootclasspathFragment_UnknownImageName(t *testing.T) {
image_name: "unknown",
contents: ["foo"],
}
+
+ java_import {
+ name: "foo",
+ jars: ["foo.jar"],
+ }
`)
}
@@ -72,6 +83,18 @@ func TestBootclasspathFragmentInconsistentArtConfiguration_Platform(t *testing.T
"apex",
],
}
+
+ java_library {
+ name: "foo",
+ srcs: ["foo.java"],
+ installable: true,
+ }
+
+ java_library {
+ name: "bar",
+ srcs: ["bar.java"],
+ installable: true,
+ }
`)
}
@@ -92,6 +115,18 @@ func TestBootclasspathFragmentInconsistentArtConfiguration_ApexMixture(t *testin
"apex2",
],
}
+
+ java_library {
+ name: "foo",
+ srcs: ["foo.java"],
+ installable: true,
+ }
+
+ java_library {
+ name: "bar",
+ srcs: ["bar.java"],
+ installable: true,
+ }
`)
}