summaryrefslogtreecommitdiff
path: root/runtime/common_runtime_test.cc
diff options
context:
space:
mode:
author Jeff Hao <jeffhao@google.com> 2014-07-24 16:26:09 -0700
committer Jeff Hao <jeffhao@google.com> 2014-08-06 12:49:57 -0700
commitf0a3f09c3d54646166a55c05a6b39c7dd504129c (patch)
tree35a76479f1b774ae100727547a48da5bc0878e66 /runtime/common_runtime_test.cc
parent484e2c2d3531e5bb36f0e1e12f26c708939c6579 (diff)
Fix proxy tracing and enable tests that now work with tracing.
Also updates proxy_test to generate an image for GetQuickOatCodeFor. Bug: 16386215 Change-Id: Ie7daad3d73ea7b60187bc1e7037ade0df8277107
Diffstat (limited to 'runtime/common_runtime_test.cc')
-rw-r--r--runtime/common_runtime_test.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index 8e363c4fa3..6cf56196d6 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -212,7 +212,7 @@ void CommonRuntimeTest::ClearDirectory(const char* dirpath) {
if ((strcmp(e->d_name, ".") == 0) || (strcmp(e->d_name, "..") == 0)) {
continue;
}
- std::string filename(dalvik_cache_);
+ std::string filename(dirpath);
filename.push_back('/');
filename.append(e->d_name);
int stat_result = lstat(filename.c_str(), &s);
@@ -265,6 +265,19 @@ std::string CommonRuntimeTest::GetDexFileName(const std::string& jar_prefix) {
return StringPrintf("%s/framework/%s.jar", GetAndroidRoot(), jar_prefix.c_str());
}
+std::string CommonRuntimeTest::GetLibCoreOatFileName() {
+ return GetOatFileName("core");
+}
+
+std::string CommonRuntimeTest::GetOatFileName(const std::string& oat_prefix) {
+ if (IsHost()) {
+ const char* host_dir = getenv("ANDROID_HOST_OUT");
+ CHECK(host_dir != nullptr);
+ return StringPrintf("%s/framework/%s.art", host_dir, oat_prefix.c_str());
+ }
+ return StringPrintf("%s/framework/%s.art", GetAndroidRoot(), oat_prefix.c_str());
+}
+
std::string CommonRuntimeTest::GetTestAndroidRoot() {
if (IsHost()) {
const char* host_dir = getenv("ANDROID_HOST_OUT");