testsuite: ensure GCC_COLORS is unset
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 1 Jun 2017 19:43:13 +0000 (19:43 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Thu, 1 Jun 2017 19:43:13 +0000 (19:43 +0000)
gcc/testsuite/ChangeLog:
* lib/gcc-dg.exp: Ensure GCC_COLORS is unset.

From-SVN: r248800

gcc/testsuite/ChangeLog
gcc/testsuite/lib/gcc-dg.exp

index ff1b070..1f1bc3c 100644 (file)
@@ -1,3 +1,7 @@
+2017-06-01  David Malcolm  <dmalcolm@redhat.com>
+
+       * lib/gcc-dg.exp: Ensure GCC_COLORS is unset.
+
 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
 
        * debug12.adb, debug12.ads: New testcase.
index b6865b4..e555574 100644 (file)
@@ -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]"