From f0a3f09c3d54646166a55c05a6b39c7dd504129c Mon Sep 17 00:00:00 2001 From: Jeff Hao Date: Thu, 24 Jul 2014 16:26:09 -0700 Subject: 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 --- runtime/common_runtime_test.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'runtime/common_runtime_test.cc') 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"); -- cgit v1.2.3-59-g8ed1b