Changes in directory llvm/tools/bugpoint:
ExecutionDriver.cpp updated: 1.67 -> 1.68 --- Log message: Add an -append-exit-code option to bugpoint. This will cause bugpoint to append "exit <retcode>" to the end of the output file. This is used by the nightly tester to make bugpoint match the output generated by the RunSafely.sh script so it doesn't find false positives. --- Diffs of the changes: (+11 -0) ExecutionDriver.cpp | 11 +++++++++++ 1 files changed, 11 insertions(+) Index: llvm/tools/bugpoint/ExecutionDriver.cpp diff -u llvm/tools/bugpoint/ExecutionDriver.cpp:1.67 llvm/tools/bugpoint/ExecutionDriver.cpp:1.68 --- llvm/tools/bugpoint/ExecutionDriver.cpp:1.67 Wed Nov 8 23:57:53 2006 +++ llvm/tools/bugpoint/ExecutionDriver.cpp Tue Nov 28 01:04:10 2006 @@ -56,6 +56,11 @@ cl::desc("Assume nonzero exit code is failure (default on)"), cl::init(true)); + cl::opt<bool> + AppendProgramExitCode("append-exit-code", + cl::desc("Append the exit code to the output so it gets diff'd too"), + cl::init(false)); + cl::opt<std::string> InputFile("input", cl::init("/dev/null"), cl::desc("Filename to pipe in as stdin (default: /dev/null)")); @@ -277,6 +282,12 @@ } } + if (AppendProgramExitCode) { + std::ofstream outFile(OutputFile.c_str(), std::ios_base::app); + outFile << "exit " << RetVal << '\n'; + outFile.close(); + } + if (ProgramExitedNonzero != 0) *ProgramExitedNonzero = (RetVal != 0); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits