Fix test breakages caused by removal of gdb_py_test_multiple.

Tom de Vries detected that some python tests were broken as
they were still using gdb_py_test_multiple that was replaced
by gdb_test_multiline.  Repair these tests by using the new function.

gdb/testsuite/ChangeLog
2020-06-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	* gdb.python/py-breakpoint.exp: use gdb_test_multiline instead
	of gdb_py_test_multiple.
	* gdb.python/py-cmd.exp: Likewise.
	* gdb.python/py-events.exp: Likewise.
	* gdb.python/py-function.exp: Likewise.
	* gdb.python/py-inferior.exp: Likewise.
	* gdb.python/py-infthread.exp: Likewise.
	* gdb.python/py-linetable.exp: Likewise.
	* gdb.python/py-parameter.exp: Likewise.
	* gdb.python/py-value.exp: Likewise.
This commit is contained in:
Philippe Waroquiers
2020-06-30 18:40:21 +02:00
parent bbd19b19e4
commit 2a17c803f6
10 changed files with 52 additions and 39 deletions

View File

@ -27,7 +27,7 @@ gdb_reinitialize_dir $srcdir/$subdir
# Skip all tests if Python scripting is not enabled.
if { [skip_python_tests] } { continue }
gdb_py_test_multiple "input convenience function" \
gdb_test_multiline "input convenience function" \
"python" "" \
"class test_func (gdb.Function):" "" \
" def __init__ (self):" "" \
@ -41,7 +41,7 @@ gdb_test "print \$test_func (\"ugh\")" "= \"test_func output, arg = ugh\"" "call
# Test returning a gdb.Value from the function. This segfaulted GDB at one point.
gdb_py_test_multiple "input value-returning convenience function" \
gdb_test_multiline "input value-returning convenience function" \
"python" "" \
"class Double (gdb.Function):" "" \
" def __init__ (self):" "" \
@ -59,7 +59,7 @@ foreach lang [concat [gdb_supported_languages] auto] {
gdb_test "print \$double (1)" "= 2" "call value-returning function, language = $lang"
}
gdb_py_test_multiple "input int-returning function" \
gdb_test_multiline "input int-returning function" \
"python" "" \
"class Yes(gdb.Function):" "" \
" def __init__(self):" "" \
@ -72,7 +72,7 @@ gdb_py_test_multiple "input int-returning function" \
gdb_test "print \$yes() && \$yes()" " = 1" "call yes with &&"
gdb_test "print \$yes() || \$yes()" " = 1" "call yes with ||"
gdb_py_test_multiple "Test GDBError" \
gdb_test_multiline "Test GDBError" \
"python" "" \
"class GDBError(gdb.Function):" "" \
" def __init__(self):" "" \
@ -85,7 +85,7 @@ gdb_py_test_multiple "Test GDBError" \
gdb_test "print \$gdberror()" "This is a GdbError.*" \
"Test GdbError. There should not be a stack trace"
gdb_py_test_multiple "Test Normal Error" \
gdb_test_multiline "Test Normal Error" \
"python" "" \
"class NormalError(gdb.Function):" "" \
" def __init__(self):" "" \
@ -99,7 +99,7 @@ gdb_test_no_output "set python print-stack full"
gdb_test "print \$normalerror()" "Traceback.*File.*line 5.*in invoke.*RuntimeError.*This is a Normal Error.*" \
"Test a Runtime error. There should be a stack trace."
gdb_py_test_multiple "input command-calling function" \
gdb_test_multiline "input command-calling function" \
"python" "" \
"class CallCommand(gdb.Function):" "" \
" def __init__(self):" "" \