Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Andrew Burgess" <aburgess@broadcom.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [PATCH] Clear GREP_OPTIONS environment variable.
Date: Wed, 16 Mar 2011 10:13:00 -0000	[thread overview]
Message-ID: <4D807468.8020703@broadcom.com> (raw)

The test gdb.base/maint.exp shells out from gdb to use grep. I have GREP_OPTIONS="--color=auto" in my environment and this causes the test to fail. The patch below clears this environment variable before running gdb. Ok to apply?

Cheers,
Andrew


gdb/testsuite/ChangeLog

2011-03-15  Andrew Burgess  <aburgess@broadcom.com>

	* lib/gdb.exp (default_gdb_start): Clear the GREP_OPTIONS
	environment variable to make grep output more predictable.

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1b601af..547a232 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1331,6 +1331,11 @@ proc default_gdb_start { } {
     # The same bug doesn't show up if we use ^P / ^N instead.
     set env(TERM) "vt100"
 
+    # Some tests (for example gdb.base/maint.exp) shell out from gdb to use
+    # grep.  Clear GREP_OPTIONS to make the behavoiur predictable, 
+    # especially having color output turned on can cause tests to fail.
+    set env(GREP_OPTIONS) ""
+
     verbose "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS"
 
     if [info exists gdb_spawn_id] {


             reply	other threads:[~2011-03-16  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 10:13 Andrew Burgess [this message]
2011-03-16 15:43 ` Tom Tromey
2011-03-16 16:57   ` Joel Brobecker
2011-03-17 11:25     ` Andrew Burgess
2011-03-25 15:46       ` Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D807468.8020703@broadcom.com \
    --to=aburgess@broadcom.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox