diff options
| author | 2021-03-29 20:27:12 +0000 | |
|---|---|---|
| committer | 2021-03-29 20:27:12 +0000 | |
| commit | 16e6aeeb51c5c8c9913a45395b9216b5368208e3 (patch) | |
| tree | c68729c5868647e123335a2b29be050096d0849a /java/boot_image_test.go | |
| parent | f682410cbf2c4f6fcc5787f033fc7cfc90a481a7 (diff) | |
| parent | c7ef9892dd3c1e51bc54321e585b6badfbd8beb4 (diff) | |
Merge "Add dependencies for art boot_image"
Diffstat (limited to 'java/boot_image_test.go')
| -rw-r--r-- | java/boot_image_test.go | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/java/boot_image_test.go b/java/boot_image_test.go index 37906ff8d..a289df877 100644 --- a/java/boot_image_test.go +++ b/java/boot_image_test.go @@ -64,3 +64,40 @@ func TestUnknownPrebuiltBootImage(t *testing.T) { } `) } + +func TestBootImageInconsistentArtConfiguration_Platform(t *testing.T) { + android.GroupFixturePreparers( + prepareForTestWithBootImage, + dexpreopt.FixtureSetArtBootJars("platform:foo", "apex:bar"), + ). + ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern( + `\QArtApexJars is invalid as it requests a platform variant of "foo"\E`)). + RunTestWithBp(t, ` + boot_image { + name: "boot-image", + image_name: "art", + apex_available: [ + "apex", + ], + } + `) +} + +func TestBootImageInconsistentArtConfiguration_ApexMixture(t *testing.T) { + android.GroupFixturePreparers( + prepareForTestWithBootImage, + dexpreopt.FixtureSetArtBootJars("apex1:foo", "apex2:bar"), + ). + ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern( + `\QArtApexJars configuration is inconsistent, expected all jars to be in the same apex but it specifies apex "apex1" and "apex2"\E`)). + RunTestWithBp(t, ` + boot_image { + name: "boot-image", + image_name: "art", + apex_available: [ + "apex1", + "apex2", + ], + } + `) +} |