diff mbox

Make sure test names are unique in gdb.base/gdbinit-history.exp

Message ID 1432255277-21570-1-git-send-email-patrick@parcs.ath.cx
State New
Headers show

Commit Message

Patrick Palka May 22, 2015, 12:41 a.m. UTC
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/gdb.base/gdbinit-history.exp | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

Comments

Pedro Alves May 22, 2015, 12:42 a.m. UTC | #1
On 05/22/2015 01:41 AM, Patrick Palka wrote:
> 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.

OK.

Thanks,
Pedro Alves
diff mbox

Patch

diff --git a/gdb/testsuite/gdb.base/gdbinit-history.exp b/gdb/testsuite/gdb.base/gdbinit-history.exp
index aba15b4..8adfd68 100644
--- a/gdb/testsuite/gdb.base/gdbinit-history.exp
+++ b/gdb/testsuite/gdb.base/gdbinit-history.exp
@@ -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