summaryrefslogtreecommitdiff
path: root/libartbase/base/common_art_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libartbase/base/common_art_test.cc')
-rw-r--r--libartbase/base/common_art_test.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/libartbase/base/common_art_test.cc b/libartbase/base/common_art_test.cc
index a087aa5316..fd6da87bc5 100644
--- a/libartbase/base/common_art_test.cc
+++ b/libartbase/base/common_art_test.cc
@@ -301,11 +301,17 @@ void CommonArtTestImpl::TearDownAndroidDataDir(const std::string& android_data,
// Get prebuilt binary tool.
// The paths need to be updated when Android prebuilts update.
std::string CommonArtTestImpl::GetAndroidTool(const char* name, InstructionSet) {
- std::string path = GetAndroidBuildTop() + "prebuilts/clang/host/linux-x86/clang-r383902b/bin/";
+#ifdef ART_TARGET_ANDROID
+ UNUSED(name);
+ LOG(FATAL) << "There are no prebuilt tools available when running on target.";
+ UNREACHABLE();
+#else
+ std::string path = GetAndroidBuildTop() + ART_CLANG_PATH + "/bin/";
CHECK(OS::DirectoryExists(path.c_str())) << path;
path += name;
CHECK(OS::FileExists(path.c_str())) << path;
return path;
+#endif
}
std::string CommonArtTestImpl::GetCoreArtLocation() {
@@ -322,7 +328,7 @@ std::unique_ptr<const DexFile> CommonArtTestImpl::LoadExpectSingleDexFile(const
MemMap::Init();
static constexpr bool kVerifyChecksum = true;
const ArtDexFileLoader dex_file_loader;
- std::string filename(location);
+ std::string filename(IsHost() ? GetAndroidBuildTop() + location : location);
if (!dex_file_loader.Open(filename.c_str(),
std::string(location),
/* verify= */ true,