[1/4] Fix error check in gdb_py_test_silent_cmd
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
Commit Message
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.
---
gdb/testsuite/lib/gdb-python.exp | 1 +
1 file changed, 1 insertion(+)
@@ -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 } }
}