summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment_test.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2023-06-14 22:43:25 +0000
committer Jihoon Kang <jihoonkang@google.com> 2023-06-15 19:42:34 +0000
commit6c0df888094915e32955c2b175b29c020104d07c (patch)
tree7479b740ef66cfaa03a2b0afed73932ab757ee13 /java/bootclasspath_fragment_test.go
parent3d4d88d68e5b5796cf4d9d236793df5322a1eab5 (diff)
Cleanup remaining android.JavaApiLibraryName() references
Since the name of the java_library generated from sdk_library per api scope does not depend on the build configuration anymore, all dependency switching "magic" via android.JavaApiLibraryName() can be removed. This change also removes from-text-build-specific test cases, as those test cases depend on build configurations. Test: m nothing && m nothing --build-from-text-stub Bug: 287340610 Change-Id: I3bac35259e0cbaa16432a46cb2b128951c9bc075
Diffstat (limited to 'java/bootclasspath_fragment_test.go')
-rw-r--r--java/bootclasspath_fragment_test.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/java/bootclasspath_fragment_test.go b/java/bootclasspath_fragment_test.go
index 9bdef749b..2541f14ff 100644
--- a/java/bootclasspath_fragment_test.go
+++ b/java/bootclasspath_fragment_test.go
@@ -432,39 +432,3 @@ func TestBootclasspathFragment_Test(t *testing.T) {
fragment = result.Module("a_test_fragment", "android_common").(*BootclasspathFragmentModule)
android.AssertBoolEquals(t, "is a test fragment by type", true, fragment.isTestFragment())
}
-
-func TestBootclassFragment_LinkTextStub(t *testing.T) {
- result := android.GroupFixturePreparers(
- prepareForJavaTest,
- prepareForTestWithBootclasspathFragment,
- PrepareForTestWithJavaSdkLibraryFiles,
- FixtureWithLastReleaseApis("mysdklibrary"),
- android.FixtureModifyConfig(func(config android.Config) {
- config.SetBuildFromTextStub(true)
- }),
- ).RunTestWithBp(t, `
- bootclasspath_fragment {
- name: "myfragment",
- contents: ["mysdklibrary"],
- hidden_api: {split_packages: ["*"]},
- additional_stubs: [
- "android-non-updatable",
- ],
- }
- java_sdk_library {
- name: "mysdklibrary",
- srcs: ["a.java"],
- shared_library: false,
- public: {enabled: true},
- system: {enabled: true},
- }
- `)
-
- fragment := result.ModuleForTests("myfragment", "android_common")
- ruleCommand := fragment.Rule("modularHiddenAPIStubFlagsFile").RuleParams.Command
- android.AssertStringDoesContain(t, "Command expected to contain library as dependency stub dex",
- ruleCommand, "--dependency-stub-dex=out/soong/.intermediates/default/java/android-non-updatable.stubs.module_lib.from-text/android_common/dex/android-non-updatable.stubs.module_lib.from-text.jar")
- android.AssertStringDoesNotContain(t,
- "Command not expected to contain multiple api_library as dependency stub dex", ruleCommand,
- "--dependency-stub-dex=out/soong/.intermediates/default/java/android-non-updatable.stubs.from-text/android_common/dex/android-non-updatable.stubs.from-text.jar")
-}