summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment_test.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2019-11-19 19:44:10 +0000
committerPaul Duffin <paulduffin@google.com>2021-04-26 21:21:58 +0100
commitba6afd0dbab19efedc5a849ab2bc6f7923ec6ce3 (patch)
treea947daee1a62726324990d118cf6613b6b291708 /java/bootclasspath_fragment_test.go
parent2da0424b191af82d91e28e46440f43927bde8827 (diff)
Allow contents and image_name to be specified together
Previously, only one of the contents or image_name properties could be specified at once which meant that there was no way to create a prebuilt which lists its fixed contents while at the same time allowing it to check that that the contents matched what the build configuration required. e.g. a prebuilt_bootclasspath_fragment that had image_name: "art", could not list its contents and also check that those contents matched the ART_APEX_JARS which the build configuration required. This change allows contents and image_name to be specified together and adds a check to make sure that the contents are consistent with the configuration appropriate to the image_name. The check is only performed for modules that are active so that a prebuilt_bootclasspath_fragment which was created without coverage enabled (the default) would not cause a build failure in a coverage build unless it was preferred. Bug: 177892522 Test: m nothing Change-Id: Ie601f29f707b3f6030fa7d252afa2c4826cc9f8e
Diffstat (limited to 'java/bootclasspath_fragment_test.go')
-rw-r--r--java/bootclasspath_fragment_test.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/java/bootclasspath_fragment_test.go b/java/bootclasspath_fragment_test.go
index 0db93619c..0419a469b 100644
--- a/java/bootclasspath_fragment_test.go
+++ b/java/bootclasspath_fragment_test.go
@@ -113,19 +113,6 @@ func TestBootclasspathFragmentWithoutImageNameOrContents(t *testing.T) {
`)
}
-func TestBootclasspathFragmentWithImageNameAndContents(t *testing.T) {
- prepareForTestWithBootclasspathFragment.
- ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern(
- `\Qboth of the "image_name" and "contents" properties\E`)).
- RunTestWithBp(t, `
- bootclasspath_fragment {
- name: "bootclasspath-fragment",
- image_name: "boot",
- contents: ["other"],
- }
- `)
-}
-
func TestBootclasspathFragment_Coverage(t *testing.T) {
prepareForTestWithFrameworkCoverage := android.FixtureMergeEnv(map[string]string{
"EMMA_INSTRUMENT": "true",