Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] GDB testsuite: Suppress GCC's colored output
@ 2017-08-02 17:35 Andreas Arnez
  2017-08-02 20:22 ` Simon Marchi
       [not found] ` <86h8xn3833.fsf@gmail.com>
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas Arnez @ 2017-08-02 17:35 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-08-14 18:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-02 17:35 [PATCH] GDB testsuite: Suppress GCC's colored output Andreas Arnez
2017-08-02 20:22 ` Simon Marchi
2017-08-03 11:13   ` Andreas Arnez
     [not found] ` <86h8xn3833.fsf@gmail.com>
2017-08-04 12:19   ` Simon Marchi
2017-08-04 13:00     ` Yao Qi
2017-08-08 18:29   ` Andreas Arnez
2017-08-09 10:01     ` Simon Marchi
2017-08-09 10:29     ` Yao Qi
2017-08-14 18:32       ` Andreas Arnez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox