From 713878d335bd83fc3a6bca059ea0f82c092219ae Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 23 Jul 2019 11:13:39 +0900 Subject: [PATCH 1/2] Test the link to the sphal namespace when only needed The link to the spahal namespace is not done when there is no lib in vendor/etc/public.libraries.txt Bug: 130388701 Test: libnativeloader_test on cuttlefish Change-Id: I38f2d01305bca5ea942573484a0e0b9b44b1c0be --- libnativeloader/native_loader_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnativeloader/native_loader_test.cpp b/libnativeloader/native_loader_test.cpp index 9648aad8b..614188b27 100644 --- a/libnativeloader/native_loader_test.cpp +++ b/libnativeloader/native_loader_test.cpp @@ -336,7 +336,7 @@ class NativeLoaderTest_Create : public NativeLoaderTest { std::string expected_parent_namespace = "platform"; bool expected_link_with_platform_ns = true; bool expected_link_with_runtime_ns = true; - bool expected_link_with_sphal_ns = true; + bool expected_link_with_sphal_ns = !vendor_public_libraries().empty(); bool expected_link_with_vndk_ns = false; bool expected_link_with_default_ns = false; std::string expected_shared_libs_to_platform_ns = default_public_libraries(); From 28efde2b7a32cf45f0d4cdd02e22e9dba4071ab6 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Mon, 22 Jul 2019 14:23:12 +0900 Subject: [PATCH 2/2] Add TEST_MAPPING for libnativeloader Bug: 130388701 Test: watch TH to see if libnativeloader_test is running Change-Id: I0940d13ec4e5c680ce1dbf2f5980b3b20080f7e4 --- libnativeloader/Android.bp | 1 + libnativeloader/TEST_MAPPING | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 libnativeloader/TEST_MAPPING diff --git a/libnativeloader/Android.bp b/libnativeloader/Android.bp index d1c8351bd..b860db983 100644 --- a/libnativeloader/Android.bp +++ b/libnativeloader/Android.bp @@ -92,4 +92,5 @@ cc_test { "libnativeloader-headers", ], system_shared_libs: ["libc", "libm"], + test_suites: ["device-tests"], } diff --git a/libnativeloader/TEST_MAPPING b/libnativeloader/TEST_MAPPING new file mode 100644 index 000000000..7becb7791 --- /dev/null +++ b/libnativeloader/TEST_MAPPING @@ -0,0 +1,12 @@ +{ + "presubmit": [ + { + "name": "libnativeloader_test" + } + ], + "imports": [ + { + "path": "cts/tests/tests/jni" + } + ] +}