summaryrefslogtreecommitdiff
path: root/tests/gtest_globals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gtest_globals.cpp')
-rw-r--r--tests/gtest_globals.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/gtest_globals.cpp b/tests/gtest_globals.cpp
index 4160237ab..5b5ede8d4 100644
--- a/tests/gtest_globals.cpp
+++ b/tests/gtest_globals.cpp
@@ -24,8 +24,9 @@
#include <string>
std::string GetTestlibRoot() {
- // Calculate ANDROID_DATA assuming the binary is in "$ANDROID_DATA/somedir/binary-dir/binary"
- std::string path = android::base::Dirname(android::base::GetExecutablePath()) + "/..";
+ // Typically the executable is /data/nativetest[64]/bionic-unit-tests/bionic-unit-tests, and the
+ // test libraries are in /data/nativetest[64]/bionic-loader-test-libs.
+ std::string path = android::base::GetExecutableDirectory() + "/..";
std::string out_path;
if (!android::base::Realpath(path.c_str(), &out_path)) {