* lib/gdb-python.exp: New file.
* gdb.python/py-block.exp: Use it. * gdb.python/py-breakpoint.exp: Ditto. * gdb.python/py-frame.exp: Ditto. * gdb.python/py-inferior.exp: Ditto. * gdb.python/py-param.exp: Ditto. * gdb.python/py-prettyprint.exp: Ditto. * gdb.python/py-shared.exp: Ditto. * gdb.python/py-symbol.exp: Ditto. * gdb.python/py-symtab.exp: Ditto. * gdb.python/py-type.exp: Ditto. * gdb.python/py-value.exp: Ditto. * gdb.python/python.exp: Ditto.
This commit is contained in:
parent
05e522ef51
commit
a2c09bd0c7
14 changed files with 85 additions and 166 deletions
|
@ -20,6 +20,8 @@ if $tracelevel then {
|
|||
strace $tracelevel
|
||||
}
|
||||
|
||||
load_lib gdb-python.exp
|
||||
|
||||
set testfile "python"
|
||||
set srcfile ${testfile}.c
|
||||
set srcfile1 ${testfile}-1.c
|
||||
|
@ -39,17 +41,6 @@ gdb_reinitialize_dir $srcdir/$subdir
|
|||
# Skip all tests if Python scripting is not enabled.
|
||||
if { [skip_python_tests] } { continue }
|
||||
|
||||
# Run a command in GDB, and report a failure if a Python exception is thrown.
|
||||
# If report_pass is true, report a pass if no exception is thrown.
|
||||
proc gdb_py_test_silent_cmd {cmd name report_pass} {
|
||||
global gdb_prompt
|
||||
|
||||
gdb_test_multiple $cmd $name {
|
||||
-re "Traceback.*$gdb_prompt $" { fail $name }
|
||||
-re "$gdb_prompt $" { if $report_pass { pass $name } }
|
||||
}
|
||||
}
|
||||
|
||||
gdb_test_multiple "python print 23" "verify python support" {
|
||||
-re "not supported.*$gdb_prompt $" {
|
||||
unsupported "python support is disabled"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue