aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>2017-03-20 14:57:45 -0400
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>2017-03-20 14:57:45 -0400
commit5b291c049658614196197e4ea4bb42bcc176b876 (patch)
treec6772f03eaf41d4fe86321accfa44b4213f070d2
parente696b3ad342dde596dcdad4cff6b875c361ed6d0 (diff)
downloadgdb-5b291c049658614196197e4ea4bb42bcc176b876.zip
gdb-5b291c049658614196197e4ea4bb42bcc176b876.tar.gz
gdb-5b291c049658614196197e4ea4bb42bcc176b876.tar.bz2
Add a better diagnostic message in mi_gdb_test
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>
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/mi-support.exp2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 2386c0a..f292251 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 7c23922..5682b7e 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -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
}