Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Clear GREP_OPTIONS environment variable.
@ 2011-03-16 10:13 Andrew Burgess
  2011-03-16 15:43 ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Burgess @ 2011-03-16 10:13 UTC (permalink / raw)
  To: gdb-patches

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] {


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

end of thread, other threads:[~2011-03-25 13:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-16 10:13 [PATCH] Clear GREP_OPTIONS environment variable Andrew Burgess
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

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