mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-01 13:26:47 +08:00
gdb/testsuite: Remove duplicates from gdb.mi/mi-nonstop-exit.exp
When running the testsuite, I have: Running .../gdb/testsuite/gdb.mi/mi-nonstop-exit.exp ... DUPLICATE: gdb.mi/mi-nonstop-exit.exp: breakpoint at main DUPLICATE: gdb.mi/mi-nonstop-exit.exp: mi runto main This test runs the same sequence of operations twice. Refactor the code by running both of those sequences within a foreach_with_prefix block to ensure that the commands have unique test names. Tested on x86_64-linux.
This commit is contained in:
parent
94e3acde23
commit
dd1655dfc3
@ -39,6 +39,8 @@ save_vars { GDBFLAGS } {
|
||||
mi_gdb_test "-gdb-set mi-async 1" ".*"
|
||||
mi_detect_async
|
||||
|
||||
foreach_with_prefix iteration {1 2} {
|
||||
mi_delete_breakpoints
|
||||
if { [mi_runto_main] < 0 } {
|
||||
continue
|
||||
}
|
||||
@ -46,17 +48,6 @@ if { [mi_runto_main] < 0 } {
|
||||
mi_send_resuming_command "exec-continue" "continue"
|
||||
|
||||
mi_expect_stop "exited-normally" "" "" "" "" "" "finished exec continue"
|
||||
|
||||
# Run the program again.
|
||||
|
||||
mi_delete_breakpoints
|
||||
|
||||
if { [mi_runto_main] < 0 } {
|
||||
continue
|
||||
}
|
||||
|
||||
mi_send_resuming_command "exec-continue" "continue (2)"
|
||||
|
||||
mi_expect_stop "exited-normally" "" "" "" "" "" "finished exec continue (2)"
|
||||
|
||||
mi_gdb_exit
|
||||
|
Loading…
Reference in New Issue
Block a user