[llvm] 86e9181 - llvm-reduce: Color output of child processes
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 18:00:55 PDT 2022
Author: Matt Arsenault
Date: 2022-10-12T18:00:46-07:00
New Revision: 86e9181ded7c5b6aa67a3a84089fce850c84f27a
URL: https://github.com/llvm/llvm-project/commit/86e9181ded7c5b6aa67a3a84089fce850c84f27a
DIFF: https://github.com/llvm/llvm-project/commit/86e9181ded7c5b6aa67a3a84089fce850c84f27a.diff
LOG: llvm-reduce: Color output of child processes
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.
Added:
Modified:
llvm/tools/llvm-reduce/TestRunner.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-reduce/TestRunner.cpp b/llvm/tools/llvm-reduce/TestRunner.cpp
index 63de850de5b2..5681a81fd6a8 100644
--- a/llvm/tools/llvm-reduce/TestRunner.cpp
+++ b/llvm/tools/llvm-reduce/TestRunner.cpp
@@ -39,9 +39,13 @@ int TestRunner::run(StringRef Filename) {
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: " +
More information about the llvm-commits
mailing list