Remove Modules() from BootclasspathFragmentApexContentInfo.
The Modules() method was for the ART boot image in the ART APEX. It's no longer needed because we don't install the ART boot image in the ART APEX anymore. Bug: 290583827 Test: m nothing Change-Id: I674a5fa1ed18908413a64129df5947c7d26e638e
This commit is contained in:
@@ -46,78 +46,6 @@ var prepareForTestWithArtApex = android.GroupFixturePreparers(
|
|||||||
dexpreopt.FixtureSetBootImageProfiles("art/build/boot/boot-image-profile.txt"),
|
dexpreopt.FixtureSetBootImageProfiles("art/build/boot/boot-image-profile.txt"),
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBootclasspathFragments(t *testing.T) {
|
|
||||||
result := android.GroupFixturePreparers(
|
|
||||||
prepareForTestWithBootclasspathFragment,
|
|
||||||
// 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,
|
|
||||||
|
|
||||||
java.PrepareForTestWithJavaSdkLibraryFiles,
|
|
||||||
java.FixtureWithLastReleaseApis("foo"),
|
|
||||||
).RunTestWithBp(t, `
|
|
||||||
java_sdk_library {
|
|
||||||
name: "foo",
|
|
||||||
srcs: ["b.java"],
|
|
||||||
}
|
|
||||||
|
|
||||||
java_library {
|
|
||||||
name: "bar",
|
|
||||||
srcs: ["b.java"],
|
|
||||||
installable: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
apex {
|
|
||||||
name: "com.android.art",
|
|
||||||
key: "com.android.art.key",
|
|
||||||
bootclasspath_fragments: ["art-bootclasspath-fragment"],
|
|
||||||
updatable: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
apex_key {
|
|
||||||
name: "com.android.art.key",
|
|
||||||
public_key: "com.android.art.avbpubkey",
|
|
||||||
private_key: "com.android.art.pem",
|
|
||||||
}
|
|
||||||
|
|
||||||
java_library {
|
|
||||||
name: "baz",
|
|
||||||
apex_available: [
|
|
||||||
"com.android.art",
|
|
||||||
],
|
|
||||||
srcs: ["b.java"],
|
|
||||||
compile_dex: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
java_library {
|
|
||||||
name: "quuz",
|
|
||||||
apex_available: [
|
|
||||||
"com.android.art",
|
|
||||||
],
|
|
||||||
srcs: ["b.java"],
|
|
||||||
compile_dex: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
bootclasspath_fragment {
|
|
||||||
name: "art-bootclasspath-fragment",
|
|
||||||
image_name: "art",
|
|
||||||
// Must match the "com.android.art:" entries passed to FixtureConfigureBootJars above.
|
|
||||||
contents: ["baz", "quuz"],
|
|
||||||
apex_available: [
|
|
||||||
"com.android.art",
|
|
||||||
],
|
|
||||||
hidden_api: {
|
|
||||||
split_packages: ["*"],
|
|
||||||
},
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
)
|
|
||||||
|
|
||||||
// Make sure that the art-bootclasspath-fragment is using the correct configuration.
|
|
||||||
checkBootclasspathFragment(t, result, "art-bootclasspath-fragment", "android_common_apex10000",
|
|
||||||
"com.android.art:baz,com.android.art:quuz")
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestBootclasspathFragments_FragmentDependency(t *testing.T) {
|
func TestBootclasspathFragments_FragmentDependency(t *testing.T) {
|
||||||
result := android.GroupFixturePreparers(
|
result := android.GroupFixturePreparers(
|
||||||
prepareForTestWithBootclasspathFragment,
|
prepareForTestWithBootclasspathFragment,
|
||||||
@@ -248,16 +176,6 @@ func TestBootclasspathFragments_FragmentDependency(t *testing.T) {
|
|||||||
checkAPIScopeStubs("other", otherInfo, java.CorePlatformHiddenAPIScope)
|
checkAPIScopeStubs("other", otherInfo, java.CorePlatformHiddenAPIScope)
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkBootclasspathFragment(t *testing.T, result *android.TestResult, moduleName, variantName string, expectedConfiguredModules string) {
|
|
||||||
t.Helper()
|
|
||||||
|
|
||||||
bootclasspathFragment := result.ModuleForTests(moduleName, variantName).Module().(*java.BootclasspathFragmentModule)
|
|
||||||
|
|
||||||
bootclasspathFragmentInfo := result.ModuleProvider(bootclasspathFragment, java.BootclasspathFragmentApexContentInfoProvider).(java.BootclasspathFragmentApexContentInfo)
|
|
||||||
modules := bootclasspathFragmentInfo.Modules()
|
|
||||||
android.AssertStringEquals(t, "invalid modules for "+moduleName, expectedConfiguredModules, modules.String())
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestBootclasspathFragmentInArtApex(t *testing.T) {
|
func TestBootclasspathFragmentInArtApex(t *testing.T) {
|
||||||
commonPreparer := android.GroupFixturePreparers(
|
commonPreparer := android.GroupFixturePreparers(
|
||||||
prepareForTestWithBootclasspathFragment,
|
prepareForTestWithBootclasspathFragment,
|
||||||
|
@@ -389,10 +389,6 @@ var BootclasspathFragmentApexContentInfoProvider = blueprint.NewProvider(Bootcla
|
|||||||
// BootclasspathFragmentApexContentInfo contains the bootclasspath_fragments contributions to the
|
// BootclasspathFragmentApexContentInfo contains the bootclasspath_fragments contributions to the
|
||||||
// apex contents.
|
// apex contents.
|
||||||
type BootclasspathFragmentApexContentInfo struct {
|
type BootclasspathFragmentApexContentInfo struct {
|
||||||
// The configured modules, will be empty if this is from a bootclasspath_fragment that does not
|
|
||||||
// set image_name: "art".
|
|
||||||
modules android.ConfiguredJarList
|
|
||||||
|
|
||||||
// Map from the base module name (without prebuilt_ prefix) of a fragment's contents module to the
|
// Map from the base module name (without prebuilt_ prefix) of a fragment's contents module to the
|
||||||
// hidden API encoded dex jar path.
|
// hidden API encoded dex jar path.
|
||||||
contentModuleDexJarPaths bootDexJarByModule
|
contentModuleDexJarPaths bootDexJarByModule
|
||||||
@@ -405,10 +401,6 @@ type BootclasspathFragmentApexContentInfo struct {
|
|||||||
profileInstallPathInApex string
|
profileInstallPathInApex string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i BootclasspathFragmentApexContentInfo) Modules() android.ConfiguredJarList {
|
|
||||||
return i.modules
|
|
||||||
}
|
|
||||||
|
|
||||||
// DexBootJarPathForContentModule returns the path to the dex boot jar for specified module.
|
// DexBootJarPathForContentModule returns the path to the dex boot jar for specified module.
|
||||||
//
|
//
|
||||||
// The dex boot jar is one which has had hidden API encoding performed on it.
|
// The dex boot jar is one which has had hidden API encoding performed on it.
|
||||||
@@ -597,7 +589,6 @@ func (b *BootclasspathFragmentModule) provideApexContentInfo(ctx android.ModuleC
|
|||||||
}
|
}
|
||||||
|
|
||||||
if imageConfig != nil {
|
if imageConfig != nil {
|
||||||
info.modules = imageConfig.modules
|
|
||||||
global := dexpreopt.GetGlobalConfig(ctx)
|
global := dexpreopt.GetGlobalConfig(ctx)
|
||||||
if !global.DisableGenerateProfile {
|
if !global.DisableGenerateProfile {
|
||||||
info.profilePathOnHost = bootImageFiles.profile
|
info.profilePathOnHost = bootImageFiles.profile
|
||||||
|
Reference in New Issue
Block a user