This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] GDB testsuite: Suppress GCC's colored output
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 02 Aug 2017 19:35:18 +0200
- Subject: [PATCH] GDB testsuite: Suppress GCC's colored output
- Authentication-results: sourceware.org; auth=none
Newer GCC versions yield colored diagnostic messages by default, which may
be useful when executing GDB interactively from a terminal. But when run
from a GDB test case, the compiler output is written into gdb.log, where
such escape sequences are usually more inhibiting than helpful to the
evaluation of test results. So this patch suppresses that.
gdb/testsuite/ChangeLog:
* lib/gdb.exp (gdb_compile): Suppress GCC's coloring of messages.
---
gdb/testsuite/lib/gdb.exp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 3d3eaab..9a5c27f 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3552,6 +3552,9 @@ proc gdb_compile {source dest type options} {
}
}
+ # Stop the compiler from producing colored output.
+ setenv GCC_COLORS ""
+
set result [target_compile $source $dest $type $options]
# Prune uninteresting compiler (and linker) output.
--
2.5.0