forked from Imagelibrary/binutils-gdb
Fix error check in gdb_py_test_silent_cmd
I added a new test using gdb_py_test_silent_cmd, and then was surprised to find out that the new test passed -- it caused a Python exception and I had expected it to fail. This patch fixes this proc to detect this situation and fail.
This commit is contained in:
@@ -22,6 +22,7 @@ proc gdb_py_test_silent_cmd { cmd name report_pass } {
|
||||
global gdb_prompt
|
||||
|
||||
gdb_test_multiple $cmd $name {
|
||||
-re "Error occurred in Python:.*$gdb_prompt $" { fail $name }
|
||||
-re "Traceback.*$gdb_prompt $" { fail $name }
|
||||
-re "$gdb_prompt $" { if $report_pass { pass $name } }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user