Rename BootImageModule to BootclasspathFragmentModule
Also renames files, tests, module types in a similar fashion.
There are still some references to image and boot image. They are kept
for the following reasons:
* image_name - this is the name of an ART boot image, i.e. the
collection of .art/.oat/.vdex files.
* BootImageInfo - again this is related to the ART boot image.
* .../art_boot_images/... paths - ditto.
Bug: 177892522
Test: m nothing
Change-Id: Ie1f4738061d131fee75de48bc26a7601481bad4d
diff --git a/apex/Android.bp b/apex/Android.bp
index 7b52402..e234181 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -30,7 +30,7 @@
],
testSrcs: [
"apex_test.go",
- "boot_image_test.go",
+ "bootclasspath_fragment_test.go",
"platform_bootclasspath_test.go",
"vndk_test.go",
],
diff --git a/apex/apex.go b/apex/apex.go
index 088a462..762912e 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1695,7 +1695,7 @@
}
case bcpfTag:
{
- if _, ok := child.(*java.BootImageModule); !ok {
+ if _, ok := child.(*java.BootclasspathFragmentModule); !ok {
ctx.PropertyErrorf("bootclasspath_fragments", "%q is not a boot_image module", depName)
return false
}
diff --git a/apex/boot_image_test.go b/apex/bootclasspath_fragment_test.go
similarity index 91%
rename from apex/boot_image_test.go
rename to apex/bootclasspath_fragment_test.go
index dab72f7..87f0132 100644
--- a/apex/boot_image_test.go
+++ b/apex/bootclasspath_fragment_test.go
@@ -22,8 +22,8 @@
"android/soong/java"
)
-// Contains tests for boot_image logic from java/boot_image.go as the ART boot image requires
-// modules from the ART apex.
+// Contains tests for bootclasspath_fragment logic from java/bootclasspath_fragment.go as the ART
+// bootclasspath_fragment requires modules from the ART apex.
var prepareForTestWithBootclasspathFragment = android.GroupFixturePreparers(
java.PrepareForTestWithDexpreopt,
@@ -40,7 +40,7 @@
func TestBootclasspathFragments(t *testing.T) {
result := android.GroupFixturePreparers(
prepareForTestWithBootclasspathFragment,
- // Configure some libraries in the art and framework boot images.
+ // Configure some libraries in the art bootclasspath_fragment and platform_bootclasspath.
java.FixtureConfigureBootJars("com.android.art:baz", "com.android.art:quuz", "platform:foo", "platform:bar"),
prepareForTestWithArtApex,
@@ -141,9 +141,9 @@
func checkBootclasspathFragment(t *testing.T, result *android.TestResult, moduleName string, expectedConfiguredModules string, expectedBootclasspathFragmentFiles string) {
t.Helper()
- bootImage := result.ModuleForTests(moduleName, "android_common").Module().(*java.BootImageModule)
+ bootclasspathFragment := result.ModuleForTests(moduleName, "android_common").Module().(*java.BootclasspathFragmentModule)
- bootImageInfo := result.ModuleProvider(bootImage, java.BootImageInfoProvider).(java.BootImageInfo)
+ bootImageInfo := result.ModuleProvider(bootclasspathFragment, java.BootImageInfoProvider).(java.BootImageInfo)
modules := bootImageInfo.Modules()
android.AssertStringEquals(t, "invalid modules for "+moduleName, expectedConfiguredModules, modules.String())
@@ -166,7 +166,7 @@
prepareForTestWithBootclasspathFragment,
prepareForTestWithArtApex,
- // Configure some libraries in the art boot image.
+ // Configure some libraries in the art bootclasspath_fragment.
java.FixtureConfigureBootJars("com.android.art:foo", "com.android.art:bar"),
).RunTestWithBp(t, `
apex {
@@ -176,8 +176,8 @@
"mybootclasspathfragment",
],
// bar (like foo) should be transitively included in this apex because it is part of the
- // mybootclasspathfragment boot_image. However, it is kept here to ensure that the apex dedups the files
- // correctly.
+ // mybootclasspathfragment bootclasspath_fragment. However, it is kept here to ensure that the
+ // apex dedups the files correctly.
java_libs: [
"bar",
],
@@ -208,7 +208,7 @@
],
}
- boot_image {
+ bootclasspath_fragment {
name: "mybootclasspathfragment",
image_name: "art",
apex_available: [
@@ -233,7 +233,7 @@
}
// Make sure that a preferred prebuilt doesn't affect the apex.
- prebuilt_boot_image {
+ prebuilt_bootclasspath_fragment {
name: "mybootclasspathfragment",
image_name: "art",
prefer: true,
@@ -277,7 +277,7 @@
"com.android.art-arm.apex": nil,
}),
- // Configure some libraries in the art boot image.
+ // Configure some libraries in the art bootclasspath_fragment.
java.FixtureConfigureBootJars("com.android.art:foo", "com.android.art:bar"),
).RunTestWithBp(t, `
prebuilt_apex {
@@ -309,7 +309,7 @@
],
}
- prebuilt_boot_image {
+ prebuilt_bootclasspath_fragment {
name: "mybootclasspathfragment",
image_name: "art",
apex_available: [
@@ -369,7 +369,7 @@
],
}
- boot_image {
+ bootclasspath_fragment {
name: "mybootclasspathfragment",
contents: [
"foo",