Move isolated test runner out of bionic.
Use a global gtest isolation runner rather than the custom one in
bionic.
Test: Ran all unit tests and verified same behavior before and after.
Change-Id: I24a7cf17cf8e018d0f51969c64b53ce9059cc779
diff --git a/tests/gtest_globals.cpp b/tests/gtest_globals.cpp
index 538a534..607544a 100644
--- a/tests/gtest_globals.cpp
+++ b/tests/gtest_globals.cpp
@@ -23,12 +23,9 @@
#include <string>
-static std::string init_testlib_root() {
+std::string GetTestlibRoot() {
// Calculate ANDROID_DATA assuming the binary is in "$ANDROID_DATA/somedir/binary-dir/binary"
- std::string path = get_executable_path();
-
- path = android::base::Dirname(path);
- path += "/..";
+ std::string path = android::base::Dirname(android::base::GetExecutablePath()) + "/..";
std::string out_path;
if (!android::base::Realpath(path.c_str(), &out_path)) {
@@ -46,9 +43,3 @@
return real_path;
}
-
-const std::string& get_testlib_root() {
- static const std::string testlib_root = init_testlib_root();
- return testlib_root;
-}
-