aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-09-23 09:29:47 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-09-26 17:28:21 -0400
commit1c51fceb5c2801b6abadcc48fab56b9abd15ae92 (patch)
tree8063b3edbe177169b67f058eb1919b6f17dd3584 /gdb/testsuite/lib
parent687e348e720a1fcd3850324c9f0ce20b97b456b5 (diff)
downloadgdb-1c51fceb5c2801b6abadcc48fab56b9abd15ae92.zip
gdb-1c51fceb5c2801b6abadcc48fab56b9abd15ae92.tar.gz
gdb-1c51fceb5c2801b6abadcc48fab56b9abd15ae92.tar.bz2
gdb/testsuite: use gdb_test in gdb.gdb/python-helper.exp
If some command in there gives the wrong answer, we currently have to wait for a timeout for the test to continue. For instance, I currently see: print *val->type $1 = Python Exception <class 'gdb.error'>: Cannot take address of method length. (outer-gdb) FAIL: gdb.gdb/python-helper.exp: pretty print type (timeout) We can avoid this and modernize the test at the same time by using the -prompt option of gdb_test. gdb_test_no_output currently accepts a -prompt_re option (the variable name passed to parse_args defines the option name), but I think it's a typo. It's supposed to be -prompt, like gdb_test. I can't find anything using -prompt_re using grep. Change it to just "prompt". Change-Id: Icc0a9a0ef482e62460c708bccdd544c11d711eca
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 68536b0..5ab4df1 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1478,17 +1478,17 @@ proc gdb_test_no_output { args } {
global gdb_prompt
parse_args {
- {prompt_re ""}
+ {prompt ""}
{nopass}
}
lassign $args command message
- set prompt_re [fill_in_default_prompt $prompt_re]
+ set prompt [fill_in_default_prompt $prompt]
set command_regex [string_to_regexp $command]
- gdb_test_multiple $command $message -prompt $prompt_re {
- -re "^$command_regex\r\n$prompt_re" {
+ gdb_test_multiple $command $message -prompt $prompt {
+ -re "^$command_regex\r\n$prompt" {
if {!$nopass} {
pass $gdb_test_name
}