diff options
author | Tom Tromey <tromey@adacore.com> | 2024-11-20 06:50:17 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-12-09 14:16:46 -0700 |
commit | 523a46ee9795bbec2d1d5cf7e434adc2a3044f94 (patch) | |
tree | a0ce7a2503d1b90011d0fd74d099148f42b55126 /gdb/testsuite/lib/gdb-python.exp | |
parent | 9ba5ef4bf1e3266db47eb500beab803d03c74b3f (diff) | |
download | binutils-523a46ee9795bbec2d1d5cf7e434adc2a3044f94.zip binutils-523a46ee9795bbec2d1d5cf7e434adc2a3044f94.tar.gz binutils-523a46ee9795bbec2d1d5cf7e434adc2a3044f94.tar.bz2 |
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.
Diffstat (limited to 'gdb/testsuite/lib/gdb-python.exp')
-rw-r--r-- | gdb/testsuite/lib/gdb-python.exp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb-python.exp b/gdb/testsuite/lib/gdb-python.exp index e27d5c1..a820c87 100644 --- a/gdb/testsuite/lib/gdb-python.exp +++ b/gdb/testsuite/lib/gdb-python.exp @@ -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 } } } |