summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Ulya Trafimovich <skvadrik@google.com> 2020-04-21 15:36:33 +0100
committer Ulya Trafimovich <skvadrik@google.com> 2020-04-30 14:42:32 +0100
commit50c4a4b19f9d25d8d6154a53a92b6dd3305a989b (patch)
tree8d2aa84056d66ba7790e74b449de7932338ca6c2 /apex/apex_test.go
parentb407131a0ef69ebd5ec04d49d92735b1af18778f (diff)
Use two-column format for PRODUCT_BOOT_JARS components.
The first component is the apex name, or a special name "platform" if the boot jar is a platform jar rather than a part of some apex. This is a prerequisite change for moving core-icu4j to a separate com.android.i18n apex. Old one-column format is still supported, but all unqualified components of PRODUCT_BOOT_JARS get "platform:" prepended to them after reading the product makefiles. Test: aosp_walleye-userdebug boots Bug: 138994281 Change-Id: Ic229159fdcdaf6182210a53b63850a389dd786fc
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index dea7a087e..229b013e1 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -4517,68 +4517,68 @@ func TestNoUpdatableJarsInBootImage(t *testing.T) {
// updatable jar from ART apex in the ART boot image => ok
transform = func(config *dexpreopt.GlobalConfig) {
- config.ArtApexJars = []string{"some-art-lib"}
+ config.ArtApexJars = []string{"com.android.art.something:some-art-lib"}
}
testNoUpdatableJarsInBootImage(t, "", bp, transform)
// updatable jar from ART apex in the framework boot image => error
error = "module 'some-art-lib' from updatable apex 'com.android.art.something' is not allowed in the framework boot image"
transform = func(config *dexpreopt.GlobalConfig) {
- config.BootJars = []string{"some-art-lib"}
+ config.BootJars = []string{"com.android.art.something:some-art-lib"}
}
testNoUpdatableJarsInBootImage(t, error, bp, transform)
// updatable jar from some other apex in the ART boot image => error
error = "module 'some-updatable-apex-lib' from updatable apex 'some-updatable-apex' is not allowed in the ART boot image"
transform = func(config *dexpreopt.GlobalConfig) {
- config.ArtApexJars = []string{"some-updatable-apex-lib"}
+ config.ArtApexJars = []string{"some-updatable-apex:some-updatable-apex-lib"}
}
testNoUpdatableJarsInBootImage(t, error, bp, transform)
// non-updatable jar from some other apex in the ART boot image => error
error = "module 'some-non-updatable-apex-lib' is not allowed in the ART boot image"
transform = func(config *dexpreopt.GlobalConfig) {
- config.ArtApexJars = []string{"some-non-updatable-apex-lib"}
+ config.ArtApexJars = []string{"some-non-updatable-apex:some-non-updatable-apex-lib"}
}
testNoUpdatableJarsInBootImage(t, error, bp, transform)
// updatable jar from some other apex in the framework boot image => error
error = "module 'some-updatable-apex-lib' from updatable apex 'some-updatable-apex' is not allowed in the framework boot image"
transform = func(config *dexpreopt.GlobalConfig) {
- config.BootJars = []string{"some-updatable-apex-lib"}
+ config.BootJars = []string{"some-updatable-apex:some-updatable-apex-lib"}
}
testNoUpdatableJarsInBootImage(t, error, bp, transform)
// non-updatable jar from some other apex in the framework boot image => ok
transform = func(config *dexpreopt.GlobalConfig) {
- config.BootJars = []string{"some-non-updatable-apex-lib"}
+ config.BootJars = []string{"some-non-updatable-apex:some-non-updatable-apex-lib"}
}
testNoUpdatableJarsInBootImage(t, "", bp, transform)
// nonexistent jar in the ART boot image => error
error = "failed to find a dex jar path for module 'nonexistent'"
transform = func(config *dexpreopt.GlobalConfig) {
- config.ArtApexJars = []string{"nonexistent"}
+ config.ArtApexJars = []string{"platform:nonexistent"}
}
testNoUpdatableJarsInBootImage(t, error, bp, transform)
// nonexistent jar in the framework boot image => error
error = "failed to find a dex jar path for module 'nonexistent'"
transform = func(config *dexpreopt.GlobalConfig) {
- config.BootJars = []string{"nonexistent"}
+ config.BootJars = []string{"platform:nonexistent"}
}
testNoUpdatableJarsInBootImage(t, error, bp, transform)
// platform jar in the ART boot image => error
error = "module 'some-platform-lib' is not allowed in the ART boot image"
transform = func(config *dexpreopt.GlobalConfig) {
- config.ArtApexJars = []string{"some-platform-lib"}
+ config.ArtApexJars = []string{"platform:some-platform-lib"}
}
testNoUpdatableJarsInBootImage(t, error, bp, transform)
// platform jar in the framework boot image => ok
transform = func(config *dexpreopt.GlobalConfig) {
- config.BootJars = []string{"some-platform-lib"}
+ config.BootJars = []string{"platform:some-platform-lib"}
}
testNoUpdatableJarsInBootImage(t, "", bp, transform)
}