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