* [commit/testsuite] do not emit PASS for gdb_test_no_output test if message is empty string.
@ 2010-06-03 20:30 Joel Brobecker
0 siblings, 0 replies; only message in thread
From: Joel Brobecker @ 2010-06-03 20:30 UTC (permalink / raw)
To: gdb-patches; +Cc: Joel Brobecker
Hello,
This patch makes gdb_test_no_output not emit a PASS for a sucessful
test when the message is the empty string. As requested, this makes
it consistent with what gdb_test does.
2010-06-03 Joel Brobecker <brobecker@adacore.com>
* lib/gdb.exp (gdb_test_no_output): Do not emit pass for
successful test if message is the empty string.
Tested on x86_64-linux. Checked in.
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/lib/gdb.exp | 7 +++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d6b2640..9d827b0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-03 Joel Brobecker <brobecker@adacore.com>
+
+ * lib/gdb.exp (gdb_test_no_output): Do not emit pass for
+ successful test if message is the empty string.
+
2010-06-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.fortran/module.exp (stopped language detection): New test.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 563ffa7..eb949f8 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -883,7 +883,8 @@ proc gdb_test { args } {
#
# See gdb_test_multiple for a description of the COMMAND and MESSAGE
# parameters. If MESSAGE is ommitted, then COMMAND will be used as
-# the message.
+# the message. (If MESSAGE is the empty string, then sometimes we do not
+# call pass or fail at all; I don't understand this at all.)
proc gdb_test_no_output { args } {
global gdb_prompt
@@ -897,7 +898,9 @@ proc gdb_test_no_output { args } {
set command_regex [string_to_regexp $command]
gdb_test_multiple $command $message {
-re "^$command_regex\r\n$gdb_prompt $" {
- pass $message
+ if ![string match "" $message] then {
+ pass "$message"
+ }
}
}
}
--
1.7.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-03 20:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-03 20:30 [commit/testsuite] do not emit PASS for gdb_test_no_output test if message is empty string Joel Brobecker
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).