[PATCH] D135632: llvm-reduce: Color output of child processes
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 10 18:08:01 PDT 2022
arsenm created this revision.
arsenm added reviewers: regehr, aeubanks, lebedev.ri.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
When reducing llvm-reduce with llvm-reduce, it can be confusing
to figure out what lines are printed by the child or parent. Not
sure this is the most reliable way to set and restore this.
https://reviews.llvm.org/D135632
Files:
llvm/tools/llvm-reduce/TestRunner.cpp
Index: llvm/tools/llvm-reduce/TestRunner.cpp
===================================================================
--- llvm/tools/llvm-reduce/TestRunner.cpp
+++ llvm/tools/llvm-reduce/TestRunner.cpp
@@ -39,9 +39,13 @@
for (int i = 0; i < 3; ++i)
Redirects.push_back(Empty);
}
+
+ outs().changeColor(raw_ostream::YELLOW);
+
int Result =
sys::ExecuteAndWait(TestName, ProgramArgs, /*Env=*/None, Redirects,
/*SecondsToWait=*/0, /*MemoryLimit=*/0, &ErrMsg);
+ outs().resetColor();
if (Result < 0) {
Error E = make_error<StringError>("Error running interesting-ness test: " +
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135632.466674.patch
Type: text/x-patch
Size: 633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221011/d9a3629b/attachment.bin>
More information about the llvm-commits
mailing list