gdb/testsuite: Make test names unique in gdb.linespec tests
authorAndrew Burgess <andrew.burgess@embecosm.com>
Sun, 15 Sep 2019 17:42:54 +0000 (13:42 -0400)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 3 Oct 2019 16:48:02 +0000 (17:48 +0100)
Make test names unique in the gdb.linespec tests.  On my local machine
this removed 43 duplicate test names.  It is possible that different
setups might still encounter some duplicates.

gdb/testsuite/ChangeLog:

* gdb.linespec/explicit.exp: Make test names unique.
* gdb.linespec/ls-errs.exp: Likewise.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.linespec/explicit.exp
gdb/testsuite/gdb.linespec/ls-errs.exp

index b78d16f81714b18ec9ec62cf71320c4a56716e87..4228c26b38b207b6f8886d69ed54aedd905c6c3b 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-03  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * gdb.linespec/explicit.exp: Make test names unique.
+       * gdb.linespec/ls-errs.exp: Likewise.
+
 2019-10-03  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * gdb.reverse/break-precsave.exp: Make test names unique.
index e50e5033437777495e9bff28793f9e4e5387342f..03f898c3c135a8011da43272bdc5cf756695210d 100644 (file)
@@ -104,8 +104,10 @@ namespace eval $testfile {
 
        # Test abbreviations
        set short [string range $arg 0 3]
-       gdb_test "break -$short" \
-           [string_to_regexp "missing argument for \"-$short\""]
+       if { $arg != $short } {
+           gdb_test "break -$short" \
+               [string_to_regexp "missing argument for \"-$short\""]
+       }
     }
 
     # Test invalid arguments
index f031c461cb9707bfec608be9c8457dbd1e18a52e..0743d89bfafbb5688b303bac5013293d61d90f32 100644 (file)
@@ -92,7 +92,8 @@ proc do_test {lang} {
 
        gdb_test "break $linespec" [string_to_regexp \
                                    [eval format \$error_messages($msg_id) \
-                                    $args]]
+                                    $args]] \
+           "'break $linespec'"
     }
 
     # Some commonly used whitespace tests around ':'.
@@ -234,7 +235,7 @@ proc do_test {lang} {
        test_break "main:here${x}" unexpected "end of input"
     }
 
-    foreach x {"3" "+100" "-100" "foo"} {
+    foreach_with_prefix x {"3" "+100" "-100" "foo"} {
        test_break "main 3" invalid_function "main 3"
        test_break "-function \"main $x\"" invalid_function "main $x"
        if {$x == "foo"} {
This page took 0.034223 seconds and 4 git commands to generate.