diff options
author | 2024-09-20 01:09:48 +0000 | |
---|---|---|
committer | 2024-09-20 23:47:36 +0000 | |
commit | 52c01a1897f68e93bacfb2d7500ecc31f3bd3c61 (patch) | |
tree | 19caf92fb9d205faaf2cfaf0684c400058a45919 /apex/bootclasspath_fragment_test.go | |
parent | a326b320ab2b8b5cbad003571f3fccf1573b20a6 (diff) |
Remove internal deapexer module
The build ations will be created by the top-level apex.
Details
1. In GenerateAndroidBuildActions, do a graph walk to determine if the
apex has exported deps.
2. If there are exported deps, call the newly introduced `deapex`
function. This registers the build rules and returns a DeapexerInfo
object. This was previously provided by the internal deapexer
dependency.
3. Update `dexpreoptSystemServerJars and `provideApexExportsInfo` to use
the DeapexerInfo object from (2).
A lot of unit tests that relied on the legacy mechanism of deapexing
have been updated.
Test: go test ./apex
Test: lunch cf_x86_64_phone-next-userdebug (uses mainline prebuilts)
Test: verified no diff in file_list.txt
Bug: 368337090
Change-Id: I0edb681beccac4d2a9ceb73f9a506c081a8a96e0
Diffstat (limited to 'apex/bootclasspath_fragment_test.go')
-rw-r--r-- | apex/bootclasspath_fragment_test.go | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/apex/bootclasspath_fragment_test.go b/apex/bootclasspath_fragment_test.go index df7857f29..a0bac9166 100644 --- a/apex/bootclasspath_fragment_test.go +++ b/apex/bootclasspath_fragment_test.go @@ -398,11 +398,20 @@ func TestBootclasspathFragmentInArtApex(t *testing.T) { // Make sure that a preferred prebuilt with consistent contents doesn't affect the apex. addPrebuilt(true, "foo", "bar"), + android.FixtureMergeMockFs(android.MockFS{ + "apex_contributions/Android.bp": []byte(` + apex_contributions { + name: "prebuilt_art_contributions", + contents: ["prebuilt_com.android.art"], + api_domain: "com.android.art", + } + `)}), + android.PrepareForTestWithBuildFlag("RELEASE_APEX_CONTRIBUTIONS_ART", "prebuilt_art_contributions"), java.FixtureSetBootImageInstallDirOnDevice("art", "apex/com.android.art/javalib"), ).RunTest(t) - ensureExactDeapexedContents(t, result.TestContext, "prebuilt_com.android.art", "android_common", []string{ + ensureExactDeapexedContents(t, result.TestContext, "prebuilt_com.android.art", "android_common_com.android.art", []string{ "etc/boot-image.prof", "javalib/bar.jar", "javalib/foo.jar", @@ -495,6 +504,7 @@ func TestBootclasspathFragmentInPrebuiltArtApex(t *testing.T) { java.FixtureConfigureBootJars("com.android.art:foo", "com.android.art:bar"), dexpreopt.FixtureSetTestOnlyArtBootImageJars("com.android.art:foo", "com.android.art:bar"), java.FixtureSetBootImageInstallDirOnDevice("art", "apex/com.android.art/javalib"), + android.PrepareForTestWithBuildFlag("RELEASE_APEX_CONTRIBUTIONS_ART", "prebuilt_art_contributions"), ) bp := ` @@ -552,6 +562,12 @@ func TestBootclasspathFragmentInPrebuiltArtApex(t *testing.T) { src: "com.mycompany.android.art.apex", exported_bootclasspath_fragments: ["art-bootclasspath-fragment"], } + + apex_contributions { + name: "prebuilt_art_contributions", + contents: ["prebuilt_com.android.art"], + api_domain: "com.android.art", + } ` t.Run("disabled alternative APEX", func(t *testing.T) { @@ -562,26 +578,18 @@ func TestBootclasspathFragmentInPrebuiltArtApex(t *testing.T) { `dex2oatd`, `prebuilt_art-bootclasspath-fragment`, `prebuilt_com.android.art.apex.selector`, - `prebuilt_com.android.art.deapexer`, }) java.CheckModuleDependencies(t, result.TestContext, "art-bootclasspath-fragment", "android_common_com.android.art", []string{ `all_apex_contributions`, `dex2oatd`, `prebuilt_bar`, - `prebuilt_com.android.art.deapexer`, `prebuilt_foo`, }) module := result.ModuleForTests("dex_bootjars", "android_common") checkCopiesToPredefinedLocationForArt(t, result.Config, module, "bar", "foo") }) - - t.Run("enabled alternative APEX", func(t *testing.T) { - preparers.ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern( - "Multiple installable prebuilt APEXes provide ambiguous deapexers: prebuilt_com.android.art and prebuilt_com.mycompany.android.art")). - RunTestWithBp(t, fmt.Sprintf(bp, "")) - }) } // checkCopiesToPredefinedLocationForArt checks that the supplied modules are copied to the |