Make sure test names are unique in gdb.base/gdbinit-history.exp
authorPatrick Palka <patrick@parcs.ath.cx>
Thu, 21 May 2015 22:53:03 +0000 (18:53 -0400)
committerPatrick Palka <patrick@parcs.ath.cx>
Fri, 22 May 2015 01:05:00 +0000 (21:05 -0400)
Use with_test_prefix to avoid duplicating test names when calling
the procedure test_gdbinit_history_setting multiple times.

gdb/testsuite/ChangeLog:

* gdb.base/gdbinit-history.exp (test_gdbinit_history_setting):
Use with_test_prefix.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/gdbinit-history.exp

index 49f56f45eb40b6d507f7826b162f92d3132f7d72..b8f514b528e511633587b73261b15f9fe8b81fae 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-22  Patrick Palka  <patrick@parcs.ath.cx>
+
+       * gdb.base/gdbinit-history.exp (test_gdbinit_history_setting):
+       Use with_test_prefix.
+
 2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * gdb.base/completion.exp: Add test for completion of layout
index aba15b451582e2f6619b6e72286efe50a1ad9494..8adfd68a78f52f596cfec219724dfb174701c6e3 100644 (file)
@@ -39,15 +39,17 @@ proc test_gdbinit_history_setting { home size } {
     set saved_internal_gdbflags $INTERNAL_GDBFLAGS
     set INTERNAL_GDBFLAGS [string map {"-nx" ""} $INTERNAL_GDBFLAGS]
 
-    gdb_exit
-    gdb_start
+    with_test_prefix "home=$home" {
+       gdb_exit
+       gdb_start
 
-    gdb_test "show history size" "The size of the command history is $size."
+       gdb_test "show history size" "The size of the command history is $size."
 
-    if { $size == "0" } {
-        gdb_test_no_output "show commands"
-    } elseif { $size != "1" } {
-        gdb_test "show commands" "    .  show history size\r\n    .  show commands"
+       if { $size == "0" } {
+           gdb_test_no_output "show commands"
+       } elseif { $size != "1" } {
+           gdb_test "show commands" "    .  show history size\r\n    .  show commands"
+       }
     }
 
     set INTERNAL_GDBFLAGS $saved_internal_gdbflags