public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Make sure test names are unique in gdb.base/gdbinit-history.exp
@ 2015-05-22  0:41 Patrick Palka
  2015-05-22  0:42 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Palka @ 2015-05-22  0:41 UTC (permalink / raw)
  To: gdb-patches; +Cc: Patrick Palka

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(-)

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
-- 
2.4.1.217.g6c1249c

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Make sure test names are unique in gdb.base/gdbinit-history.exp
  2015-05-22  0:41 [PATCH] Make sure test names are unique in gdb.base/gdbinit-history.exp Patrick Palka
@ 2015-05-22  0:42 ` Pedro Alves
  0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2015-05-22  0:42 UTC (permalink / raw)
  To: Patrick Palka, gdb-patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-22  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-22  0:41 [PATCH] Make sure test names are unique in gdb.base/gdbinit-history.exp Patrick Palka
2015-05-22  0:42 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).