aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-01-19 11:19:32 -0700
committerTom Tromey <tromey@adacore.com>2023-02-08 10:12:22 -0700
commit300fa060abbfd8d36c81d8cc777ea1f32f07b4f0 (patch)
treef73612e0e95646f507f242f9c2c7f192180bf152 /gdb
parent49c1de0e72098e71c28faa13ae2705988de81220 (diff)
downloadbinutils-300fa060abbfd8d36c81d8cc777ea1f32f07b4f0.zip
binutils-300fa060abbfd8d36c81d8cc777ea1f32f07b4f0.tar.gz
binutils-300fa060abbfd8d36c81d8cc777ea1f32f07b4f0.tar.bz2
Don't let .gdb_history file cause failures
I had a .gdb_history file in my testsuite directory in the build tree, and this provoked a failure in gdbhistsize-history.exp. It seems simple to prevent this file from causing a failure.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.base/gdbhistsize-history.exp4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/gdbhistsize-history.exp b/gdb/testsuite/gdb.base/gdbhistsize-history.exp
index 59fd2d0..00c3ea4 100644
--- a/gdb/testsuite/gdb.base/gdbhistsize-history.exp
+++ b/gdb/testsuite/gdb.base/gdbhistsize-history.exp
@@ -35,6 +35,10 @@ proc test_histsize_history_setting { histsize size { env_var "GDBHISTSIZE" } } {
unset -nocomplain env(GDBHISTFILE)
unset -nocomplain env(GDBHISTSIZE)
+ # Ensure we don't accidentally pick up a .gdb_history from the
+ # testsuite directory.
+ set env(GDBHISTFILE) [standard_output_file .gdb_history]
+
set env($env_var) $histsize
with_test_prefix "histsize=$histsize" {