[gdb/testsuite] Fix duplicate test-names in gdb.ada
authorTom de Vries <tdevries@suse.de>
Tue, 12 May 2020 09:05:44 +0000 (11:05 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 12 May 2020 09:05:44 +0000 (11:05 +0200)
In gdb.ada we have these duplicate test-names:
...
DUPLICATE: gdb.ada/catch_ex.exp: continuing to program completion
DUPLICATE: gdb.ada/mi_catch_ex.exp: breakpoint at main
DUPLICATE: gdb.ada/mi_catch_ex.exp: mi runto main
DUPLICATE: gdb.ada/mi_catch_ex_hand.exp: breakpoint at main
DUPLICATE: gdb.ada/mi_catch_ex_hand.exp: mi runto main
...

Fix these using with_test_prefix.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-05-12  Tom de Vries  <tdevries@suse.de>

* gdb.ada/catch_ex.exp: Use with_test_prefix.
* gdb.ada/mi_catch_ex.exp: Same.
* gdb.ada/mi_catch_ex_hand.exp: Same.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/catch_ex.exp
gdb/testsuite/gdb.ada/mi_catch_ex.exp
gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp

index ae72ce6dd73e774e990d42cd293dcf7beb6bf340..ad4e50338808341d2644e8e48c54b3305eee66e0 100644 (file)
@@ -1,3 +1,9 @@
+2020-05-12  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.ada/catch_ex.exp: Use with_test_prefix.
+       * gdb.ada/mi_catch_ex.exp: Same.
+       * gdb.ada/mi_catch_ex_hand.exp: Same.
+
 2020-05-12  Tom de Vries  <tdevries@suse.de>
 
        * gdb.fortran/complex.exp: Use with_test_prefix.
index 5bdb63c8fc64a341638f1aab1dac71f6ee4333ba..7bb1c06f544d7817655d71b4c42b74b0d19fbbb1 100644 (file)
@@ -162,9 +162,10 @@ gdb_test "continue" \
          "Continuing\.$eol$temp_catchpoint_msg$eol.*SPOT1" \
          "continuing to temporary catchpoint"
 
-gdb_test "continue" \
-         "Continuing\..*$inferior_exited_re.*" \
-         "continuing to program completion"
-
+with_test_prefix "temporary catchpoint" {
+    gdb_test "continue" \
+       "Continuing\..*$inferior_exited_re.*" \
+       "continuing to program completion"
+}
 
 
index 60a5f6f19ee7107f289ae781a41eb8e18b7e3518..4b3e4f6f0b1bdf08cd67c1c9780dd98b315cd2c5 100644 (file)
@@ -69,9 +69,11 @@ mi_gdb_load ${binfile}
 # 1. Try catching all exceptions.  #
 ####################################
 
-if ![mi_run_to_main] then {
-   fail "cannot run to main, testcase aborted"
-   return 0
+with_test_prefix "scenario 1" {
+    if ![mi_run_to_main] then {
+       fail "cannot run to main, testcase aborted"
+       return 0
+    }
 }
 
 mi_gdb_test "-catch-exception" \
@@ -125,9 +127,11 @@ continue_to_exception \
 #  - continue, we should see the unhandled Constrait_Error exception
 #  - continue, the program exits.
 
-if ![mi_run_to_main] then {
-   fail "cannot run to main, testcase aborted"
-   return 0
+with_test_prefix "scenario 2" {
+    if ![mi_run_to_main] then {
+       fail "cannot run to main, testcase aborted"
+       return 0
+    }
 }
 
 mi_gdb_test "-catch-exception -e Program_Error" \
index 159b22173a01874d212f65434e7e492b91c3e603..59c8a10085197dfb5684d99192bad13ecd628ec0 100644 (file)
@@ -64,9 +64,11 @@ if [mi_gdb_start] {
 # 1. Try catching all exceptions handlers.  #
 #############################################
 
-if ![mi_run_to_main] then {
-   fail "cannot run to main, testcase aborted"
-   return 0
+with_test_prefix "scenario 1" {
+    if ![mi_run_to_main] then {
+       fail "cannot run to main, testcase aborted"
+       return 0
+    }
 }
 
 mi_gdb_test "-catch-handlers" \
@@ -114,9 +116,11 @@ continue_to_exception_handler \
 #  - continue, we should not stop at the Program_Error exception handler
 #    but exit instead.
 
-if ![mi_run_to_main] then {
-   fail "cannot run to main, testcase aborted"
-   return 0
+with_test_prefix "scenario 2" {
+    if ![mi_run_to_main] then {
+       fail "cannot run to main, testcase aborted"
+       return 0
+    }
 }
 
 mi_gdb_test "-catch-handlers -e Constraint_Error" \