diff options
author | 2024-12-03 01:33:09 +0000 | |
---|---|---|
committer | 2024-12-03 02:30:04 +0000 | |
commit | 10c4136b1f838de9c0f3832f642eb92e439dce1d (patch) | |
tree | 974baaf8ac30e3ca20aef977095532feddc8d978 /apex/apex_test.go | |
parent | 4e305cec97bd9bb6a9e4472a167efc4ac11a0836 (diff) |
Reland "Skip packaging cross container cc deps of apk-in-apex"
This relands https://r.android.com/3375509, but uses `NotInPlatform` of
the top-level app in `collectAppDeps`.
The original implementation was reverted because it skipped packaging
jni lib deps that crossed an api domain boundary. This is the intended
behavior for apk-in-apex, but runs into issues for android_test. The
linkerconfig for these has been setup to allow access to LLNDK (in
system) and LLNDK_MOVED_TO_APEX_LIBRARIES. Other libraries like
`libnativebridge` cannot be accessed by tests on device, so the tests
need their own copy.
Test: m ArtServiceTests
Test: verified that the contents of the apk are same before and after
Bug: 375473764
Change-Id: I3a3985e576959c3113fc1e11f43dbe669603ec22
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r-- | apex/apex_test.go | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index 27c0340de..282cd1dd3 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -12149,34 +12149,32 @@ func TestApexVerifyNativeImplementationLibs(t *testing.T) { }, dependencyPath: []string{"myapex", "libjni", "libbar", "libplatform"}, }, - // TODO: embedded JNI in apps should be checked too, but Soong currently just packages the transitive - // JNI libraries even if they came from another apex. - //{ - // name: "app jni library dependency in other apex", - // bpModifier: addToSharedLibs("libembeddedjni", "libotherapex#impl"), - // dependencyPath: []string{"myapex", "myapp", "libembeddedjni", "libotherapex"}, - //}, - //{ - // name: "transitive app jni library dependency in other apex", - // bpModifier: func(bp *bpmodify.Blueprint) { - // addToSharedLibs("libembeddedjni", "libbar")(bp) - // addToSharedLibs("libbar", "libotherapex#impl")(bp) - // }, - // dependencyPath: []string{"myapex", "myapp", "libembeddedjni", "libbar", "libotherapex"}, - //}, - //{ - // name: "app jni library dependency in platform", - // bpModifier: addToSharedLibs("libembeddedjni", "libplatform#impl"), - // dependencyPath: []string{"myapex", "myapp", "libembeddedjni", "libplatform"}, - //}, - //{ - // name: "transitive app jni library dependency in platform", - // bpModifier: func(bp *bpmodify.Blueprint) { - // addToSharedLibs("libembeddedjni", "libbar")(bp) - // addToSharedLibs("libbar", "libplatform#impl")(bp) - // }, - // dependencyPath: []string{"myapex", "myapp", "libembeddedjni", "libbar", "libplatform"}, - //}, + { + name: "app jni library dependency in other apex", + bpModifier: addToSharedLibs("libembeddedjni", "libotherapex#impl"), + dependencyPath: []string{"myapex", "myapp", "libembeddedjni", "libotherapex"}, + }, + { + name: "transitive app jni library dependency in other apex", + bpModifier: func(bp *bpmodify.Blueprint) { + addToSharedLibs("libembeddedjni", "libbar")(bp) + addToSharedLibs("libbar", "libotherapex#impl")(bp) + }, + dependencyPath: []string{"myapex", "myapp", "libembeddedjni", "libbar", "libotherapex"}, + }, + { + name: "app jni library dependency in platform", + bpModifier: addToSharedLibs("libembeddedjni", "libplatform#impl"), + dependencyPath: []string{"myapex", "myapp", "libembeddedjni", "libplatform"}, + }, + { + name: "transitive app jni library dependency in platform", + bpModifier: func(bp *bpmodify.Blueprint) { + addToSharedLibs("libembeddedjni", "libbar")(bp) + addToSharedLibs("libbar", "libplatform#impl")(bp) + }, + dependencyPath: []string{"myapex", "myapp", "libembeddedjni", "libbar", "libplatform"}, + }, { name: "binary dependency in other apex", bpModifier: addToSharedLibs("mybin", "libotherapex#impl"), |