summaryrefslogtreecommitdiff
path: root/java/bootclasspath_fragment_test.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-06-27 20:53:39 +0100
committerPaul Duffin <paulduffin@google.com>2021-06-28 16:05:05 +0100
commitd05bb8eebd60dc6bfdf0697fed7c4d75b8edd8c7 (patch)
tree370a1e7f64b645d4c400fed5cb7a23e37241ef0d /java/bootclasspath_fragment_test.go
parentfdb2fb6f1fc784f52601a63f501d2b650e6b5dec (diff)
Add test to show issues with widest stub dex jars
The widest stub dex jars should include the widest stub dex jars provided by each module. So, if module A has public, system and test and module B has only public then the widest stub dex jars should include module A's test and module B's public stub dex jars. Instead, they just include module A's test. That behaviour is needed so that when the "hiddenapi list" tool is run against a module C that it is passed stub dex jars from both module A and module B so that any references to the types provided by those APIs can be resolved. A follow up change will fix this issue. Bug: 179354495 Test: m nothing Merged-In: Ibd31964e8d2a33fa92fbd0b800c9fe054ee359c7 Change-Id: Ibd31964e8d2a33fa92fbd0b800c9fe054ee359c7 (cherry picked from commit d2b1e0ca92cb3f2c4b98efffd5968057af4e4320)
Diffstat (limited to 'java/bootclasspath_fragment_test.go')
-rw-r--r--java/bootclasspath_fragment_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/bootclasspath_fragment_test.go b/java/bootclasspath_fragment_test.go
index aa1c59f41..78e37df87 100644
--- a/java/bootclasspath_fragment_test.go
+++ b/java/bootclasspath_fragment_test.go
@@ -258,4 +258,8 @@ func TestBootclasspathFragment_StubLibs(t *testing.T) {
// Check that SdkCorePlatform uses public stubs from the mycoreplatform library.
corePlatformStubsJar := "out/soong/.intermediates/mycoreplatform.stubs/android_common/dex/mycoreplatform.stubs.jar"
android.AssertPathsRelativeToTopEquals(t, "core platform dex stubs jar", []string{corePlatformStubsJar}, info.TransitiveStubDexJarsByScope[CorePlatformHiddenAPIScope])
+
+ // Check the widest stubs. This should list the widest stub dex jar provided by each module.
+ // TODO(b/179354495): Fix this.
+ android.AssertPathsRelativeToTopEquals(t, "widest dex stubs jar", []string{corePlatformStubsJar}, info.TransitiveStubDexJarsByScope.StubDexJarsForWidestAPIScope())
}