diff options
Diffstat (limited to 'src/common_test.h')
-rw-r--r-- | src/common_test.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common_test.h b/src/common_test.h index 0167424092..62e75614e9 100644 --- a/src/common_test.h +++ b/src/common_test.h @@ -446,6 +446,15 @@ class CommonTest : public testing::Test { return StringPrintf("%s/framework/%s.jar", GetAndroidRoot(), jar_prefix.c_str()); } + std::string GetTestAndroidRoot() { + if (IsHost()) { + const char* host_dir = getenv("ANDROID_HOST_OUT"); + CHECK(host_dir != NULL); + return host_dir; + } + return GetAndroidRoot(); + } + const DexFile* OpenTestDexFile(const char* name) { CHECK(name != NULL); std::string filename; |