mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
Make gdb.mi/user-selected-context-sync.exp use proc_with_prefix
Pedro's patch provides a cleaner way to prefix tests with the proc name, so let's use that. gdb/testsuite/ChangeLog: * gdb.mi/user-selected-context-sync.exp (with_test_prefix_procname): Remove. (test_setup): Define with proc_with_prefix. (test_cli_inferior): Likewise. (test_cli_thread): Likewise. (test_cli_frame): Likewise. (test_cli_select_frame): Likewise. (test_cli_up_down): Likewise. (test_mi_thread_select): Likewise. (test_mi_stack_select_frame): Likewise. (test_cli_in_mi_inferior): Likewise. (test_cli_in_mi_thread): Likewise. (test_cli_in_mi_frame): Likewise. (top level): Do not use with_test_prefix_procname.
This commit is contained in:

committed by
Simon Marchi

parent
64f367a201
commit
8354c62cd1
@ -1,3 +1,20 @@
|
|||||||
|
2016-11-09 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* gdb.mi/user-selected-context-sync.exp (with_test_prefix_procname):
|
||||||
|
Remove.
|
||||||
|
(test_setup): Define with proc_with_prefix.
|
||||||
|
(test_cli_inferior): Likewise.
|
||||||
|
(test_cli_thread): Likewise.
|
||||||
|
(test_cli_frame): Likewise.
|
||||||
|
(test_cli_select_frame): Likewise.
|
||||||
|
(test_cli_up_down): Likewise.
|
||||||
|
(test_mi_thread_select): Likewise.
|
||||||
|
(test_mi_stack_select_frame): Likewise.
|
||||||
|
(test_cli_in_mi_inferior): Likewise.
|
||||||
|
(test_cli_in_mi_thread): Likewise.
|
||||||
|
(test_cli_in_mi_frame): Likewise.
|
||||||
|
(top level): Do not use with_test_prefix_procname.
|
||||||
|
|
||||||
2016-11-09 Pedro Alves <palves@redhat.com>
|
2016-11-09 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* gdb.base/commands.exp (gdbvar_simple_if_test)
|
* gdb.base/commands.exp (gdbvar_simple_if_test)
|
||||||
|
@ -50,17 +50,6 @@ set main_break_line [gdb_get_line_number "main break line"]
|
|||||||
set thread_loop_line [gdb_get_line_number "thread loop line"]
|
set thread_loop_line [gdb_get_line_number "thread loop line"]
|
||||||
set thread_caller_line [gdb_get_line_number "thread caller line"]
|
set thread_caller_line [gdb_get_line_number "thread caller line"]
|
||||||
|
|
||||||
# Call PROCNAME with the given arguments, inside a with_test_prefix $procname
|
|
||||||
# block.
|
|
||||||
|
|
||||||
proc with_test_prefix_procname { procname args } {
|
|
||||||
with_test_prefix $procname {
|
|
||||||
# Note: this syntax requires TCL 8.5, if we need to support 8.4,
|
|
||||||
# we'll need to find an alternative.
|
|
||||||
$procname {*}$args
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Return whether we expect thread THREAD to be running in mode MODE.
|
# Return whether we expect thread THREAD to be running in mode MODE.
|
||||||
#
|
#
|
||||||
# MODE can be either "all-stop" or "non-stop".
|
# MODE can be either "all-stop" or "non-stop".
|
||||||
@ -377,7 +366,7 @@ proc test_continue_to_start { mode inf } {
|
|||||||
#
|
#
|
||||||
# MODE can be either "all-stop" or "non-stop".
|
# MODE can be either "all-stop" or "non-stop".
|
||||||
|
|
||||||
proc test_setup { mode } {
|
proc_with_prefix test_setup { mode } {
|
||||||
global srcfile
|
global srcfile
|
||||||
global srcdir
|
global srcdir
|
||||||
global subdir
|
global subdir
|
||||||
@ -535,7 +524,7 @@ proc match_re_or_ensure_not_output { re test } {
|
|||||||
|
|
||||||
# Test selecting an inferior from CLI.
|
# Test selecting an inferior from CLI.
|
||||||
|
|
||||||
proc test_cli_inferior { mode } {
|
proc_with_prefix test_cli_inferior { mode } {
|
||||||
global gdb_main_spawn_id mi_spawn_id
|
global gdb_main_spawn_id mi_spawn_id
|
||||||
|
|
||||||
reset_selection "1.1"
|
reset_selection "1.1"
|
||||||
@ -567,7 +556,7 @@ proc test_cli_inferior { mode } {
|
|||||||
|
|
||||||
# Test thread selection from CLI.
|
# Test thread selection from CLI.
|
||||||
|
|
||||||
proc test_cli_thread { mode } {
|
proc_with_prefix test_cli_thread { mode } {
|
||||||
global gdb_main_spawn_id
|
global gdb_main_spawn_id
|
||||||
global mi_spawn_id
|
global mi_spawn_id
|
||||||
|
|
||||||
@ -671,7 +660,7 @@ proc test_cli_thread { mode } {
|
|||||||
|
|
||||||
# Test frame selection from CLI.
|
# Test frame selection from CLI.
|
||||||
|
|
||||||
proc test_cli_frame { mode } {
|
proc_with_prefix test_cli_frame { mode } {
|
||||||
global gdb_main_spawn_id mi_spawn_id
|
global gdb_main_spawn_id mi_spawn_id
|
||||||
|
|
||||||
with_test_prefix "thread 1.2" {
|
with_test_prefix "thread 1.2" {
|
||||||
@ -756,7 +745,7 @@ proc test_cli_frame { mode } {
|
|||||||
|
|
||||||
# Test frame selection from CLI with the select-frame command.
|
# Test frame selection from CLI with the select-frame command.
|
||||||
|
|
||||||
proc test_cli_select_frame { mode } {
|
proc_with_prefix test_cli_select_frame { mode } {
|
||||||
global gdb_main_spawn_id mi_spawn_id expect_out
|
global gdb_main_spawn_id mi_spawn_id expect_out
|
||||||
|
|
||||||
with_test_prefix "thread 1.2" {
|
with_test_prefix "thread 1.2" {
|
||||||
@ -818,7 +807,7 @@ proc test_cli_select_frame { mode } {
|
|||||||
|
|
||||||
# Test doing an up and then down command from CLI.
|
# Test doing an up and then down command from CLI.
|
||||||
|
|
||||||
proc test_cli_up_down { mode } {
|
proc_with_prefix test_cli_up_down { mode } {
|
||||||
global gdb_main_spawn_id mi_spawn_id
|
global gdb_main_spawn_id mi_spawn_id
|
||||||
|
|
||||||
reset_selection "1.2"
|
reset_selection "1.2"
|
||||||
@ -853,7 +842,7 @@ proc test_cli_up_down { mode } {
|
|||||||
|
|
||||||
# Test selecting a thread from MI.
|
# Test selecting a thread from MI.
|
||||||
|
|
||||||
proc test_mi_thread_select { mode } {
|
proc_with_prefix test_mi_thread_select { mode } {
|
||||||
global gdb_main_spawn_id mi_spawn_id
|
global gdb_main_spawn_id mi_spawn_id
|
||||||
|
|
||||||
reset_selection "1.1"
|
reset_selection "1.1"
|
||||||
@ -948,7 +937,7 @@ proc test_mi_thread_select { mode } {
|
|||||||
# place to test it.
|
# place to test it.
|
||||||
}
|
}
|
||||||
|
|
||||||
proc test_mi_stack_select_frame { mode } {
|
proc_with_prefix test_mi_stack_select_frame { mode } {
|
||||||
global gdb_main_spawn_id mi_spawn_id
|
global gdb_main_spawn_id mi_spawn_id
|
||||||
|
|
||||||
with_test_prefix "thread 1.2" {
|
with_test_prefix "thread 1.2" {
|
||||||
@ -1019,7 +1008,7 @@ proc make_cli_in_mi_command { cli_in_mi_mode command } {
|
|||||||
|
|
||||||
# Test selecting the inferior using a CLI command in the MI channel.
|
# Test selecting the inferior using a CLI command in the MI channel.
|
||||||
|
|
||||||
proc test_cli_in_mi_inferior { mode cli_in_mi_mode } {
|
proc_with_prefix test_cli_in_mi_inferior { mode cli_in_mi_mode } {
|
||||||
global gdb_main_spawn_id mi_spawn_id
|
global gdb_main_spawn_id mi_spawn_id
|
||||||
|
|
||||||
reset_selection "1.1"
|
reset_selection "1.1"
|
||||||
@ -1051,7 +1040,7 @@ proc test_cli_in_mi_inferior { mode cli_in_mi_mode } {
|
|||||||
|
|
||||||
# Test selecting the thread using a CLI command in the MI channel.
|
# Test selecting the thread using a CLI command in the MI channel.
|
||||||
|
|
||||||
proc test_cli_in_mi_thread { mode cli_in_mi_mode } {
|
proc_with_prefix test_cli_in_mi_thread { mode cli_in_mi_mode } {
|
||||||
global gdb_main_spawn_id mi_spawn_id
|
global gdb_main_spawn_id mi_spawn_id
|
||||||
|
|
||||||
reset_selection "1.1"
|
reset_selection "1.1"
|
||||||
@ -1164,7 +1153,7 @@ proc test_cli_in_mi_thread { mode cli_in_mi_mode } {
|
|||||||
|
|
||||||
# Test selecting the frame using a CLI command in the MI channel.
|
# Test selecting the frame using a CLI command in the MI channel.
|
||||||
|
|
||||||
proc test_cli_in_mi_frame { mode cli_in_mi_mode } {
|
proc_with_prefix test_cli_in_mi_frame { mode cli_in_mi_mode } {
|
||||||
global gdb_main_spawn_id mi_spawn_id
|
global gdb_main_spawn_id mi_spawn_id
|
||||||
|
|
||||||
with_test_prefix "thread 1.2" {
|
with_test_prefix "thread 1.2" {
|
||||||
@ -1258,28 +1247,28 @@ proc test_cli_in_mi_frame { mode cli_in_mi_mode } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach_with_prefix mode { "all-stop" "non-stop" } {
|
foreach_with_prefix mode { "all-stop" "non-stop" } {
|
||||||
with_test_prefix_procname test_setup $mode
|
test_setup $mode
|
||||||
|
|
||||||
# Test selecting inferior, thread and frame from CLI
|
# Test selecting inferior, thread and frame from CLI
|
||||||
|
|
||||||
with_test_prefix_procname test_cli_inferior $mode
|
test_cli_inferior $mode
|
||||||
with_test_prefix_procname test_cli_thread $mode
|
test_cli_thread $mode
|
||||||
with_test_prefix_procname test_cli_frame $mode
|
test_cli_frame $mode
|
||||||
with_test_prefix_procname test_cli_select_frame $mode
|
test_cli_select_frame $mode
|
||||||
with_test_prefix_procname test_cli_up_down $mode
|
test_cli_up_down $mode
|
||||||
|
|
||||||
# Test selecting thread and frame from MI
|
# Test selecting thread and frame from MI
|
||||||
|
|
||||||
with_test_prefix_procname test_mi_thread_select $mode
|
test_mi_thread_select $mode
|
||||||
with_test_prefix_procname test_mi_stack_select_frame $mode
|
test_mi_stack_select_frame $mode
|
||||||
|
|
||||||
# Test some CLI commands sent through MI, both with a "direct" command,
|
# Test some CLI commands sent through MI, both with a "direct" command,
|
||||||
# such as "thread 1", and with -interpreter-exec, such as
|
# such as "thread 1", and with -interpreter-exec, such as
|
||||||
# '-interpreter-exec console "thread 1"'.
|
# '-interpreter-exec console "thread 1"'.
|
||||||
|
|
||||||
foreach_with_prefix exec_mode {"direct" "interpreter-exec"} {
|
foreach_with_prefix exec_mode {"direct" "interpreter-exec"} {
|
||||||
with_test_prefix_procname test_cli_in_mi_inferior $mode $exec_mode
|
test_cli_in_mi_inferior $mode $exec_mode
|
||||||
with_test_prefix_procname test_cli_in_mi_thread $mode $exec_mode
|
test_cli_in_mi_thread $mode $exec_mode
|
||||||
with_test_prefix_procname test_cli_in_mi_frame $mode $exec_mode
|
test_cli_in_mi_frame $mode $exec_mode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user