libnativeloader_test: link non-public libs statically
Non-public NDK libs are not supposed to be tested in CTS. Specifically
native-bridged execution (e.g. arm on x86) doesn't support this.
The awkward thing here is that the test redefines all libnativebridge
symbols, but still links shared libnativebridge to call its
OpenSystemLibrary. Due to symbols duplication we cannot simply convert
libnativebridge to static. Instead, as a quick fix, we copy OpenSystemLibrary
implementation from native_bridge.cpp. We expect that one of the
codebase owners will find a better way to share OpenSystemLibrary later.
Test: cts-tradefed run cts -m libnativeloader_tests (arm on x86)
Bug: b/268440713
Change-Id: I7c651200567a299742e7604ee07b043713ca1fec
2 files changed