summaryrefslogtreecommitdiff
path: root/libartbase/base/common_art_test.cc
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2020-07-09 13:40:57 +0100
committer David Srbecky <dsrbecky@google.com> 2020-07-15 14:33:43 +0000
commit7400a5466a04f9a274d262c5cb1fd35ff496839a (patch)
tree8e4d617b0e0fdfda2c089a6a30353d470c0fb2b3 /libartbase/base/common_art_test.cc
parentb461b53c926dae7f1959a309b0a2b109b6d3c4d3 (diff)
Fixes for gtests in eng-prod
Bug: 147817558 Test: art/art-host-gtest on forrest Change-Id: I0ecfbc81fe6998d4c8c69ce6fbeb35bdd5908b55
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,