Merge "Don't run disable_ld_config_file test on non-production devices"

am: 7f9f1b6f91

Change-Id: I256ad6da2e890d4b50b5aaa9ae47a3e64253538e
This commit is contained in:
Jiyong Park 2017-08-31 00:08:29 +00:00 committed by android-build-merger
commit e1c82be90b

View file

@ -16,6 +16,10 @@
#include <gtest/gtest.h>
#if defined(__BIONIC__)
#include <android-base/properties.h>
#endif
#include <dlfcn.h>
#include <libgen.h>
#include <limits.h>
@ -226,6 +230,12 @@ TEST(dl, disable_ld_config_file) {
// This test is only for CTS.
return;
}
std::string build_type = android::base::GetProperty("ro.build.type", "user");
if (build_type == "userdebug" || build_type == "eng") {
// Skip the test for non production devices
return;
}
std::string error_message = "CANNOT LINK EXECUTABLE \"" + get_testlib_root() + "/ld_config_test_helper/ld_config_test_helper\": library \"ld_config_test_helper_lib1.so\" not found\n";
std::string helper = get_testlib_root() +
"/ld_config_test_helper/ld_config_test_helper";