do not emit PASS for gdb_test_no_output test if message is empty string.
authorJoel Brobecker <brobecker@gnat.com>
Thu, 3 Jun 2010 20:29:27 +0000 (20:29 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 3 Jun 2010 20:29:27 +0000 (20:29 +0000)
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.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index d6b264050fba05b07cb1ee00106186cbb9ef1bd4..9d827b07ea00a1e180facb1233769c0b94ce9e35 100644 (file)
@@ -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.
index 563ffa7f3af1a433ede073d369e96d5236ca1acc..eb949f8dd2a4c7c6f606765ac89b94e08c137a65 100644 (file)
@@ -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"
+            }
         }
     }
 }
This page took 0.04332 seconds and 4 git commands to generate.