testsuite/
authorDoug Evans <dje@google.com>
Fri, 5 Feb 2010 21:51:38 +0000 (21:51 +0000)
committerDoug Evans <dje@google.com>
Fri, 5 Feb 2010 21:51:38 +0000 (21:51 +0000)
* lib/gdb.exp (INTERNAL_GDBFLAGS): Don't override value provided by
user.
doc/
* gdbint.texinfo (Testsuite): Document INTERNAL_GDBFLAGS.

gdb/doc/ChangeLog
gdb/doc/gdbint.texinfo
gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index 20c8b392eda5d1770b569d522d96cfd1e51a9a13..a3008b52fb17cef86704d3cced87428c46aafb7c 100644 (file)
@@ -2,6 +2,7 @@
 
        * gdbint.texinfo (Testsuite): Add a new section to document the
        various DejaGnu variables that may be overridden.
+       Document INTERNAL_GDBFLAGS.
 
 2010-02-04  Tom Tromey  <tromey@redhat.com>
 
index 44e652a2dc586b043129e5692fafc4cca6d4550e..c90af0534f3b1f0dce74e05ddfbe9fbd7ba803eb 100644 (file)
@@ -7647,6 +7647,33 @@ different gdbserver.
 make check RUNTESTFLAGS="GDB=/usr/bin/gdb GDBSERVER=/usr/bin/gdbserver"
 @end smallexample
 
+@item @code{INTERNAL_GDBFLAGS}
+
+When running the testsuite normally one doesn't want whatever is in
+@file{~/.gdbinit} to interfere with the tests, therefore the test harness
+passes @option{-nx} to @value{GDBN}.  One also doesn't want any windowed
+version of @value{GDBN}, e.g., @command{gdbtui}, to run.
+This is achieved via @code{INTERNAL_GDBFLAGS}.  
+
+@smallexample
+set INTERNAL_GDBFLAGS "-nw -nx"
+@end smallexample
+
+This is all well and good, except when testing an installed @value{GDBN}
+that has been configured with @option{--with-system-gdbinit}.  Here one
+does not want @file{~/.gdbinit} loaded but one may want the system
+@file{.gdbinit} file loaded.  This can be achieved by pointing @code{$HOME}
+at a directory without a @file{.gdbinit} and by overriding
+@code{INTERNAL_GDBFLAGS} and removing @option{-nx}.
+
+@smallexample
+cd testsuite
+HOME=`pwd` runtest \
+  GDB=/usr/bin/gdb \
+  GDBSERVER=/usr/bin/gdbserver \
+  INTERNAL_GDBFLAGS=-nw
+@end smallexample
+
 @end itemize
 
 There are two ways to run the testsuite and pass additional parameters
index 022bcfa425dd714ae128ac34bfa9aacc83663d7d..50b69664931726961e1f3938a4680ae0a4f749bc 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-05  Doug Evans  <dje@google.com>
+
+       * lib/gdb.exp (INTERNAL_GDBFLAGS): Don't override value provided by
+       user.
+
 2010-02-05  Sami Wagiaalla  <swagiaal@redhat.com>
 
        PR c++/7935:
index 9b06a2f7503a33caef1e0c80284e7509d8d1ce28..0145afbd86b1cb6087fa7576f7a050a09b18f945 100644 (file)
@@ -54,7 +54,10 @@ if ![info exists GDBFLAGS] {
 verbose "using GDBFLAGS = $GDBFLAGS" 2
 
 # INTERNAL_GDBFLAGS contains flags that the testsuite requires.
-set INTERNAL_GDBFLAGS "-nw -nx"
+global INTERNAL_GDBFLAGS
+if ![info exists INTERNAL_GDBFLAGS] {
+    set INTERNAL_GDBFLAGS "-nw -nx"
+}
 
 # The variable gdb_prompt is a regexp which matches the gdb prompt.
 # Set it if it is not already set.
This page took 0.04805 seconds and 4 git commands to generate.