Add a better diagnostic message in mi_gdb_test
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Mon, 20 Mar 2017 18:57:45 +0000 (14:57 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Mon, 20 Mar 2017 18:57:45 +0000 (14:57 -0400)
When using mi_gdb_test, if it fails because of the presence of
unexpected output, the error message is only the message passed as
the argument with no indication that there was an unexpected output.
This change adds an additional text to the failure message to
indicate that there was an unexpected output.

gdb/testsuite/ChangeLog:

* lib/mi-support.exp (mi_gdb_test): Add additional message
for unexpected output.

Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
gdb/testsuite/ChangeLog
gdb/testsuite/lib/mi-support.exp

index 2386c0a18103c8f551f23bc5384d51eefe07b122..f29225119bb3d06a951487b50a4d75ba0f298d3e 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
+
+       * lib/mi-support.exp (mi_gdb_test): Add additional message
+       for unexpected output.
+
 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
        * gdb.base/examine-backward.c (Barrier): New character array
index 7c23922c43ed93d8a6977148decbf18026c225df..5682b7e2e1509131c692b8e53a919892f7b51daf 100644 (file)
@@ -824,7 +824,7 @@ proc mi_gdb_test { args } {
        }
         -re ".*$mi_gdb_prompt\[ \]*$" {
            if ![string match "" $message] then {
-               fail "$message"
+               fail "$message (unexpected output)"
            }
            set result 1
        }