summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2022-08-24 23:17:09 +0100
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-08-26 15:46:09 +0000
commit5af718b8bcbbaa8864b85aa635eb3d2187247c20 (patch)
tree0535d01db6812a82f67c793bdcf8132c15771ab7
parent5c5cce9938d24e7e27c65ab975b58923ee495610 (diff)
Fix UnbundledProductApp test to allow extendend public libraries.
This fixes the test to conform with the change in https://r.android.com/2165025. The test only broke on devices that do have extended public libraries, in particular wembley. Test: atest libnativeloader_test Bug: 242016740 Bug: 237572732 Change-Id: I1400a701a622f9f35b3ce0781575134faca679ae
-rw-r--r--libnativeloader/native_loader_test.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/libnativeloader/native_loader_test.cpp b/libnativeloader/native_loader_test.cpp
index 85cb36d540..7bf4cb754a 100644
--- a/libnativeloader/native_loader_test.cpp
+++ b/libnativeloader/native_loader_test.cpp
@@ -167,13 +167,16 @@ INSTANTIATE_TEST_SUITE_P(NativeLoaderTests, NativeLoaderTest, testing::Bool());
/////////////////////////////////////////////////////////////////
-std::string default_public_and_extended_libraries() {
- std::string public_libs = default_public_libraries();
+std::string append_extended_libraries(const std::string& libs) {
const std::string& ext_libs = extended_public_libraries();
if (!ext_libs.empty()) {
- public_libs = public_libs + ":" + ext_libs;
+ return libs + ":" + ext_libs;
}
- return public_libs;
+ return libs;
+}
+
+std::string default_public_and_extended_libraries() {
+ return append_extended_libraries(default_public_libraries());
}
class NativeLoaderTest_Create : public NativeLoaderTest {
@@ -380,7 +383,7 @@ TEST_P(NativeLoaderTest_Create, UnbundledProductApp) {
expected_permitted_path =
expected_permitted_path + ":/product/" LIB_DIR ":/system/product/" LIB_DIR;
expected_shared_libs_to_platform_ns =
- default_public_libraries() + ":" + llndk_libraries_product();
+ append_extended_libraries(default_public_libraries() + ":" + llndk_libraries_product());
expected_link_with_vndk_product_ns = true;
}
SetExpectations();