diff options
author | 2020-06-15 14:59:42 +0900 | |
---|---|---|
committer | 2020-06-15 15:14:12 +0900 | |
commit | 45a96778c19fcc36debb06e3908b5db4d68fef71 (patch) | |
tree | 78a2f9a381ba8e72db1c997a88de1bc01a5276e8 /apex/apex_test.go | |
parent | 000aef69b547b20553ac779d1bc8726af4b5c1d9 (diff) |
VNDK APEX should not provide native libs
While libz has stubs for other mainline modules, it doesn't provide
stubs when it is used as a VNDK lib.
In general, VNDK libs are only for vendor modules. So, we skip them even
if they have stubs.
Bug: 155456180
Test: m com.android.vndk.current
provideNativeLibs of the APEX should be empty
Change-Id: I22401a2b1732a8560802c5be850181682e183a8e
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r-- | apex/apex_test.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index 7159a4593..6a832af93 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -2817,6 +2817,40 @@ func TestVndkApexWithBinder32(t *testing.T) { }) } +func TestVndkApexShouldNotProvideNativeLibs(t *testing.T) { + ctx, _ := testApex(t, ` + apex_vndk { + name: "myapex", + key: "myapex.key", + file_contexts: ":myapex-file_contexts", + } + + apex_key { + name: "myapex.key", + public_key: "testkey.avbpubkey", + private_key: "testkey.pem", + } + + cc_library { + name: "libz", + vendor_available: true, + vndk: { + enabled: true, + }, + stubs: { + symbol_file: "libz.map.txt", + versions: ["30"], + } + } + `+vndkLibrariesTxtFiles("current"), withFiles(map[string][]byte{ + "libz.map.txt": nil, + })) + + apexManifestRule := ctx.ModuleForTests("myapex", "android_common_image").Rule("apexManifestRule") + provideNativeLibs := names(apexManifestRule.Args["provideNativeLibs"]) + ensureListEmpty(t, provideNativeLibs) +} + func TestDependenciesInApexManifest(t *testing.T) { ctx, _ := testApex(t, ` apex { |