summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Jooyung Han <jooyung@google.com> 2020-07-29 16:00:54 +0900
committer Jooyung Han <jooyung@google.com> 2020-07-29 16:00:54 +0900
commit6c4cc9ce23c0093601099501755a8a8a9b887604 (patch)
tree019f2f297d61182d8d53d185c7b3093f926d5cf5 /apex/apex_test.go
parent4514d96e1856b41581f47363f4797992a7c637de (diff)
apex: set ":vndk" as required for vendor apexes
When a vendor APEX sets use_vndk_as_stable: true, then the apex doesn't bundle VNDK libraries but instead it uses them from the "vndk" namespace at runtime. ":vndk" is a pseudo-name for VNDK libraries, which is processed by linkerconfig so that the generated linker configuration allows the namespace for the apex to access VNDK libs. Bug: 159576928 Test: test with a test-only vendor apex it runs okay with VNDK libs. (lsof shows that it opens libs from VNDK APEX) Change-Id: I924ce0fea696162575f59589b8f858deddf436b3
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 7db61d5cf..0959a49ec 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -2201,6 +2201,10 @@ func TestVendorApex(t *testing.T) {
data.Custom(&builder, name, prefix, "", data)
androidMk := builder.String()
ensureContains(t, androidMk, `LOCAL_MODULE_PATH := /tmp/target/product/test_device/vendor/apex`)
+
+ apexManifestRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Rule("apexManifestRule")
+ requireNativeLibs := names(apexManifestRule.Args["requireNativeLibs"])
+ ensureListNotContains(t, requireNativeLibs, ":vndk")
}
func TestVendorApex_use_vndk_as_stable(t *testing.T) {
@@ -2250,6 +2254,10 @@ func TestVendorApex_use_vndk_as_stable(t *testing.T) {
"bin/mybin",
"lib64/libvendor.so",
})
+
+ apexManifestRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Rule("apexManifestRule")
+ requireNativeLibs := names(apexManifestRule.Args["requireNativeLibs"])
+ ensureListContains(t, requireNativeLibs, ":vndk")
}
func TestAndroidMk_UseVendorRequired(t *testing.T) {