[llvm-commits] CVS: llvm/tools/bugpoint/ExecutionDriver.cpp
Reid Spencer
reid at x10sys.com
Mon Nov 27 23:04:24 PST 2006
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);
More information about the llvm-commits
mailing list