summaryrefslogtreecommitdiff
path: root/apex/platform_bootclasspath_test.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-06-16 01:42:33 +0100
committerPaul Duffin <paulduffin@google.com>2021-06-22 19:16:27 +0100
commit3ae9e2cef5c1265d1a1f3c1b51bb68665e66906a (patch)
treeba63924b06a17bd98f322270582aa1abec37e58e /apex/platform_bootclasspath_test.go
parent7b905a3f10cbfcee2c54d3bf2345966273bd13fc (diff)
Use classpath elements in platform_bootclasspath
Use classpath elements in newMonolithicHiddenAPIInfo. That means the method can collate information from both fragments and libraries rather than just fragments. So, this change moves the collation of the classesJars into the method. Bug: 177892522 Test: m out/soong/hiddenapi/hiddenapi-flags.csv out/soong/hiddenapi/hiddenapi-index.csv - make sure that this change does not affect the contents. Merged-In: I7c2a229fab60d02bd211438735a8d7303ed83386 Change-Id: I7c2a229fab60d02bd211438735a8d7303ed83386 (cherry picked from commit 89f570ac44af4bcf5b78fa8dad3d57f24cd3ca0e)
Diffstat (limited to 'apex/platform_bootclasspath_test.go')
-rw-r--r--apex/platform_bootclasspath_test.go29
1 files changed, 25 insertions, 4 deletions
diff --git a/apex/platform_bootclasspath_test.go b/apex/platform_bootclasspath_test.go
index 729792663..bd4a9d599 100644
--- a/apex/platform_bootclasspath_test.go
+++ b/apex/platform_bootclasspath_test.go
@@ -234,12 +234,18 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
apex {
name: "myapex",
key: "myapex.key",
- java_libs: [
- "bar",
+ bootclasspath_fragments: [
+ "my-bootclasspath-fragment",
],
updatable: false,
}
+ bootclasspath_fragment {
+ name: "my-bootclasspath-fragment",
+ contents: ["bar"],
+ apex_available: ["myapex"],
+ }
+
apex_key {
name: "myapex.key",
public_key: "testkey.avbpubkey",
@@ -267,6 +273,10 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
apex: "com.android.art",
module: "art-bootclasspath-fragment",
},
+ {
+ apex: "myapex",
+ module: "my-bootclasspath-fragment",
+ },
],
}
`,
@@ -283,7 +293,8 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
})
java.CheckPlatformBootclasspathFragments(t, result, "myplatform-bootclasspath", []string{
- `com.android.art:art-bootclasspath-fragment`,
+ "com.android.art:art-bootclasspath-fragment",
+ "myapex:my-bootclasspath-fragment",
})
// Make sure that the myplatform-bootclasspath has the correct dependencies.
@@ -307,6 +318,7 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
// The fragments.
`com.android.art:art-bootclasspath-fragment`,
+ `myapex:my-bootclasspath-fragment`,
})
}
@@ -410,6 +422,12 @@ func TestPlatformBootclasspath_AlwaysUsePrebuiltSdks(t *testing.T) {
platform_bootclasspath {
name: "myplatform-bootclasspath",
+ fragments: [
+ {
+ apex: "myapex",
+ module:"mybootclasspath-fragment",
+ },
+ ],
}
`,
)
@@ -431,7 +449,7 @@ func TestPlatformBootclasspath_AlwaysUsePrebuiltSdks(t *testing.T) {
"platform:legacy.core.platform.api.stubs",
// Needed for generating the boot image.
- `platform:dex2oatd`,
+ "platform:dex2oatd",
// The platform_bootclasspath intentionally adds dependencies on both source and prebuilt
// modules when available as it does not know which one will be preferred.
@@ -442,6 +460,9 @@ func TestPlatformBootclasspath_AlwaysUsePrebuiltSdks(t *testing.T) {
// Only a source module exists.
"myapex:bar",
+
+ // The fragments.
+ "myapex:mybootclasspath-fragment",
})
}