diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-07-13 19:24:18 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-07-13 19:24:18 +0000 |
commit | 4662c76e915914dd6fe77a4878fa9a7c8385b7d1 (patch) | |
tree | d879e26756cce50e2e9f5b772d4452d0f854ae11 /gdb/testsuite | |
parent | aa81e255f3c6846b3e7da7e0bc2f36f15c6146da (diff) | |
download | gdb-4662c76e915914dd6fe77a4878fa9a7c8385b7d1.zip gdb-4662c76e915914dd6fe77a4878fa9a7c8385b7d1.tar.gz gdb-4662c76e915914dd6fe77a4878fa9a7c8385b7d1.tar.bz2 |
gdb/testsuite/
Fix gdb.base/macscp.exp when using custom inputrc.
* gdb.base/completion.exp: Remove env(INPUTRC) set and restore.
* gdb.base/readline.exp: Remove env(INPUTRC) set and restore. Remove
env(TERM) set.
* gdb.cp/cpcompletion.exp: Remove env(INPUTRC) set.
* lib/gdb.exp (default_gdb_start): Add env(INPUTRC) and env(TERM) set.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 17 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/readline.exp | 25 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/cpcompletion.exp | 12 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 13 |
5 files changed, 22 insertions, 54 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 334fdd1..bb03bfe 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,14 @@ 2009-07-13 Jan Kratochvil <jan.kratochvil@redhat.com> + Fix gdb.base/macscp.exp when using custom inputrc. + * gdb.base/completion.exp: Remove env(INPUTRC) set and restore. + * gdb.base/readline.exp: Remove env(INPUTRC) set and restore. Remove + env(TERM) set. + * gdb.cp/cpcompletion.exp: Remove env(INPUTRC) set. + * lib/gdb.exp (default_gdb_start): Add env(INPUTRC) and env(TERM) set. + +2009-07-13 Jan Kratochvil <jan.kratochvil@redhat.com> + Fix racy clashing of output files for gdb.base{1,2}/ parallel run. * gdb.base/annota1.exp (thread_test): Import global $testfile. Change the compilation target to match the testcase name. diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 8af0189..5021b67 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -85,18 +85,6 @@ if [get_compiler_info ${binfile}] { gdb_exit -# Don't let a .inputrc file or an existing setting of INPUTRC mess up -# the test results. Even if /dev/null doesn't exist on the particular -# platform, the readline library will use the default setting just by -# failing to open the file. OTOH, opening /dev/null successfully will -# also result in the default settings being used since nothing will be -# read from this file. -global env -if [info exists env(INPUTRC)] { - set old_inputrc $env(INPUTRC) -} -set env(INPUTRC) "/dev/null" - gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} @@ -863,11 +851,6 @@ gdb_expect { } # Restore globals modified in this test... -if [info exists old_inputrc] { - set env(INPUTRC) $old_inputrc -} else { - unset env(INPUTRC) -} set timeout $oldtimeout1 return 0 diff --git a/gdb/testsuite/gdb.base/readline.exp b/gdb/testsuite/gdb.base/readline.exp index 7ae5ee6..e545c37 100644 --- a/gdb/testsuite/gdb.base/readline.exp +++ b/gdb/testsuite/gdb.base/readline.exp @@ -146,26 +146,6 @@ if $tracelevel { strace $tracelevel } -# Don't let a .inputrc file or an existing setting of INPUTRC mess up -# the test results. Even if /dev/null doesn't exist on the particular -# platform, the readline library will use the default setting just by -# failing to open the file. OTOH, opening /dev/null successfully will -# also result in the default settings being used since nothing will be -# read from this file. -global env -if [info exists env(INPUTRC)] { - set old_inputrc $env(INPUTRC) -} -set env(INPUTRC) "/dev/null" - -# The arrow key test relies on the standard VT100 bindings, so make -# sure that an appropriate terminal is selected. The same bug -# doesn't show up if we use ^P / ^N instead. -if [info exists env(TERM)] { - set old_term $env(TERM) -} -set env(TERM) "vt100" - gdb_start gdb_reinitialize_dir $srcdir/$subdir @@ -221,11 +201,6 @@ operate_and_get_next "Simple operate-and-get-next" \ # Restore globals modified in this test... -if [info exists old_inputrc] { - set env(INPUTRC) $old_inputrc -} else { - unset env(INPUTRC) -} if [info exists old_gdbhistfile] { set env(GDBHISTFILE) $old_gdbhistfile } else { diff --git a/gdb/testsuite/gdb.cp/cpcompletion.exp b/gdb/testsuite/gdb.cp/cpcompletion.exp index 4a5dbeb..bccf051 100644 --- a/gdb/testsuite/gdb.cp/cpcompletion.exp +++ b/gdb/testsuite/gdb.cp/cpcompletion.exp @@ -36,18 +36,6 @@ if {[gdb_compile "${testfile}.o" ${binfile} executable {c++ debug}] != "" } { gdb_exit -# Don't let a .inputrc file or an existing setting of INPUTRC mess up -# the test results. Even if /dev/null doesn't exist on the particular -# platform, the readline library will use the default setting just by -# failing to open the file. OTOH, opening /dev/null successfully will -# also result in the default settings being used since nothing will be -# read from this file. -global env -if [info exists env(INPUTRC)] { - set old_inputrc $env(INPUTRC) -} -set env(INPUTRC) "/dev/null" - gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 96f7d02..0c93a73 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1172,6 +1172,19 @@ proc default_gdb_start { } { set env(LC_CTYPE) C + # Don't let a .inputrc file or an existing setting of INPUTRC mess up + # the test results. Even if /dev/null doesn't exist on the particular + # platform, the readline library will use the default setting just by + # failing to open the file. OTOH, opening /dev/null successfully will + # also result in the default settings being used since nothing will be + # read from this file. + set env(INPUTRC) "/dev/null" + + # The gdb.base/readline.exp arrow key test relies on the standard VT100 + # bindings, so make sure that an appropriate terminal is selected. + # The same bug doesn't show up if we use ^P / ^N instead. + set env(TERM) "vt100" + verbose "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS" if [info exists gdb_spawn_id] { |