public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: ensure GCC_COLORS is unset
@ 2017-06-01 18:27 David Malcolm
  2017-06-01 19:36 ` Mike Stump
  0 siblings, 1 reply; 2+ messages in thread
From: David Malcolm @ 2017-06-01 18:27 UTC (permalink / raw)
  To: gcc-patches; +Cc: Dominique d'Humieres, David Malcolm

Dominique noted on IRC that the new test show-template-tree-color.C
(r248698) fails when GCC_COLORS is set in the environment.

The following patch unsets GCC_COLORS within gcc-dg.exp,
fixing this issue.

Successfully regrtested on x86_64-pc-linux-gnu; I also verified
the fix of the failing test by hand with and without GCC_COLORS set.

OK for trunk?

gcc/testsuite/ChangeLog:
	* lib/gcc-dg.exp: Ensure GCC_COLORS is unset.
---
 gcc/testsuite/lib/gcc-dg.exp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index b6865b4..e555574 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -43,6 +43,12 @@ if { [ishost "*-*-cygwin*"] } {
   setenv LANG C.ASCII
 }
 
+# Ensure GCC_COLORS is unset, for the rare testcases that verify
+# how output is colorized.
+if [info exists ::env(GCC_COLORS) ] {
+    unsetenv GCC_COLORS
+}
+
 global GCC_UNDER_TEST
 if ![info exists GCC_UNDER_TEST] {
     set GCC_UNDER_TEST "[find_gcc]"
-- 
1.8.5.3

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

end of thread, other threads:[~2017-06-01 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01 18:27 [PATCH] testsuite: ensure GCC_COLORS is unset David Malcolm
2017-06-01 19:36 ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).