summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2009-07-14 19:10:55 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2009-07-14 19:10:55 +0000
commit1518de130eccda74e195e68d7a91d5f73e18ffe3 (patch)
tree70cb62704d47a5c5e7758db60011416a64fa0b61 /llvm/tools
parentfecff3661fcd7b2aaacd81944c5382f57c5f1aba (diff)
downloadbcm5719-llvm-1518de130eccda74e195e68d7a91d5f73e18ffe3.tar.gz
bcm5719-llvm-1518de130eccda74e195e68d7a91d5f73e18ffe3.zip
Fix for bugpoint -remote-client
llvm-svn: 75665
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/bugpoint/ToolRunner.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/llvm/tools/bugpoint/ToolRunner.cpp b/llvm/tools/bugpoint/ToolRunner.cpp
index e00a2b93a0a..503a5dda136 100644
--- a/llvm/tools/bugpoint/ToolRunner.cpp
+++ b/llvm/tools/bugpoint/ToolRunner.cpp
@@ -635,6 +635,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
std::vector<const char*> ProgramArgs;
+ std::string Exec;
if (RemoteClientPath.isEmpty())
ProgramArgs.push_back(OutputBinary.c_str());
else {
@@ -650,10 +651,10 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
ProgramArgs.push_back(RemoteExtra.c_str());
}
+ // Full path to the binary
char* env_pwd = getenv("PWD");
- std::string Exec = "cd ";
Exec += env_pwd;
- Exec += "; ./";
+ Exec += "/";
Exec += OutputBinary.c_str();
ProgramArgs.push_back(Exec.c_str());
}
@@ -673,14 +674,21 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
FileRemover OutputBinaryRemover(OutputBinary);
- if (RemoteClientPath.isEmpty())
+ if (RemoteClientPath.isEmpty()) {
+ DEBUG(std::cerr << "<run locally>" << std::flush;);
return RunProgramWithTimeout(OutputBinary, &ProgramArgs[0],
sys::Path(InputFile), sys::Path(OutputFile), sys::Path(OutputFile),
Timeout, MemoryLimit);
- else
- return RunProgramWithTimeout(sys::Path(RemoteClientPath), &ProgramArgs[0],
- sys::Path(InputFile), sys::Path(OutputFile), sys::Path(OutputFile),
- Timeout, MemoryLimit);
+ } else {
+ std::cout << "<run remotely>" << std::flush;
+ int RemoteClientStatus = RunProgramWithTimeout(sys::Path(RemoteClientPath),
+ &ProgramArgs[0], sys::Path(InputFile), sys::Path(OutputFile),
+ sys::Path(OutputFile), Timeout, MemoryLimit);
+ if (RemoteClientStatus != 0) {
+ std::cerr << "Remote Client failed with an error: " <<
+ RemoteClientStatus << ".\n" << std::flush;
+ }
+ }
}
int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType,
OpenPOWER on IntegriCloud