import gdb-1999-11-08 snapshot
[deliverable/binutils-gdb.git] / gdb / testsuite / lib / gdb.exp
index f3e3ed33b5f317297679506b68f9502b39bb8ed4..64ccaa9362b0d2d2fe64b63261937347b6ff2c7c 100644 (file)
@@ -1164,17 +1164,27 @@ proc gdb_expect { args } {
     }
 }
 
+# gdb_expect_list MESSAGE SENTINAL LIST -- expect a sequence of outputs
 #
 # Check for long sequence of output by parts.
-# TEST: is the test message.
+# MESSAGE: is the test message to be printed with the test success/fail.
 # SENTINEL: Is the terminal pattern indicating that output has finished.
 # LIST: is the sequence of outputs to match.
 # If the sentinel is recognized early, it is considered an error.
 #
+# Returns:
+#    1 if the test failed,
+#    0 if the test passes,
+#   -1 if there was an internal error.
+#
 proc gdb_expect_list {test sentinal list} {
     global gdb_prompt
+    global suppress_flag
     set index 0
     set ok 1
+    if { $suppress_flag } {
+       set ok 0
+    }
     while { ${index} < [llength ${list}] } {
        set pattern [lindex ${list} ${index}]
         set index [expr ${index} + 1]
@@ -1212,6 +1222,11 @@ proc gdb_expect_list {test sentinal list} {
            }
        }
     }
+    if { ${ok} } {
+       return 0
+    } else {
+       return 1
+    }
 }
 
 #
This page took 0.025346 seconds and 4 git commands to generate.