summaryrefslogtreecommitdiffstats
path: root/runtime/common_runtime_test.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-07-11 21:14:35 -0700
committerAndreas Gampe <agampe@google.com>2014-07-27 14:55:50 -0700
commit1fe5e5cce85a3cdc64a8d226a8ef4e6134c2b9eb (patch)
tree4e6cf97184bc4a0646ef7a9afaa32ec731691d8e /runtime/common_runtime_test.cc
parentb3bf7afc4288f97f9b591d19f03362e0577ed0ec (diff)
downloadart-1fe5e5cce85a3cdc64a8d226a8ef4e6134c2b9eb.zip
art-1fe5e5cce85a3cdc64a8d226a8ef4e6134c2b9eb.tar.gz
art-1fe5e5cce85a3cdc64a8d226a8ef4e6134c2b9eb.tar.bz2
ART: Fix target test paths
Nativetest is now nativetest64 on 64b targets. Change-Id: I4c4c6bba1a56525df2993708caaae3e6f7f5f2f6
Diffstat (limited to 'runtime/common_runtime_test.cc')
-rw-r--r--runtime/common_runtime_test.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index 2826f89..a43a645 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -22,6 +22,7 @@
#include <ScopedLocalRef.h>
#include "../../external/icu/icu4c/source/common/unicode/uvernum.h"
+#include "base/macros.h"
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/stringprintf.h"
@@ -272,6 +273,17 @@ std::string CommonRuntimeTest::GetTestAndroidRoot() {
return GetAndroidRoot();
}
+// Check that for target builds we have ART_TARGET_NATIVETEST_DIR set.
+#ifdef ART_TARGET
+#ifndef ART_TARGET_NATIVETEST_DIR
+#error "ART_TARGET_NATIVETEST_DIR not set."
+#endif
+// Wrap it as a string literal.
+#define ART_TARGET_NATIVETEST_DIR_STRING STRINGIFY(ART_TARGET_NATIVETEST_DIR) "/"
+#else
+#define ART_TARGET_NATIVETEST_DIR_STRING ""
+#endif
+
std::vector<const DexFile*> CommonRuntimeTest::OpenTestDexFiles(const char* name) {
CHECK(name != nullptr);
std::string filename;
@@ -279,7 +291,7 @@ std::vector<const DexFile*> CommonRuntimeTest::OpenTestDexFiles(const char* name
filename += getenv("ANDROID_HOST_OUT");
filename += "/framework/";
} else {
- filename += "/data/nativetest/art/";
+ filename += ART_TARGET_NATIVETEST_DIR_STRING;
}
filename += "art-gtest-";
filename += name;