diff options
author | Tong Shen <endlessroad@google.com> | 2014-09-05 11:58:09 -0700 |
---|---|---|
committer | Tong Shen <endlessroad@google.com> | 2014-09-05 12:16:12 -0700 |
commit | 52ed9ad728bf03cc996feff6b3874c1c5a3d0a1f (patch) | |
tree | c9ad42c57337a3f1c7af42b9b6869fa1dbbc6bd5 /compiler/utils | |
parent | b14339904c9cacc4af74260c7325e4eb32947f95 (diff) | |
download | art-52ed9ad728bf03cc996feff6b3874c1c5a3d0a1f.zip art-52ed9ad728bf03cc996feff6b3874c1c5a3d0a1f.tar.gz art-52ed9ad728bf03cc996feff6b3874c1c5a3d0a1f.tar.bz2 |
ART: Fix host test failure (assembler_thumb_test).
Check if "bin/{as,objcopy,objdump}" exists in the tools dir we found in "prebuilts/gcc/linux-x86/arm/".
Now there's an empty tree in platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9,
causing assembler_thumb_test to fail.
Change-Id: If6ba4f778b79f95239aa85e54816ab168e7d8940
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/assembler_thumb_test.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/utils/assembler_thumb_test.cc b/compiler/utils/assembler_thumb_test.cc index 891a287..e3a9580 100644 --- a/compiler/utils/assembler_thumb_test.cc +++ b/compiler/utils/assembler_thumb_test.cc @@ -116,6 +116,19 @@ std::string GetAndroidToolsDir() { std::string subdir = toolsdir + std::string("/") + std::string(entry->d_name); size_t eabi = subdir.find(TOOL_PREFIX); if (eabi != std::string::npos) { + // Check if "bin/{as,objcopy,objdump}" exist under this folder. + struct stat exec_st; + std::string exec_path; + exec_path = subdir + "/bin/" + TOOL_PREFIX + "as"; + if (stat(exec_path.c_str(), &exec_st) != 0) + continue; + exec_path = subdir + "/bin/" + TOOL_PREFIX + "objcopy"; + if (stat(exec_path.c_str(), &exec_st) != 0) + continue; + exec_path = subdir + "/bin/" + TOOL_PREFIX + "objdump"; + if (stat(exec_path.c_str(), &exec_st) != 0) + continue; + std::string suffix = subdir.substr(eabi + strlen(TOOL_PREFIX)); double version = strtod(suffix.c_str(), nullptr); if (version > maxversion) { |