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
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index 8e363c4..6cf5619 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -212,7 +212,7 @@
     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 @@
   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");