From 3ad2b4af38e38e10166906f5238db098c886e1f9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 25 Jan 2023 10:01:57 -0700 Subject: Use mi_clean_restart more This changes a number of MI tests to use mi_clean_restart rather than separate calls. This reduces the number of lines, which is nice, and also provides a nicer model to copy for future tests. --- gdb/testsuite/gdb.mi/mi-file.exp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'gdb/testsuite/gdb.mi/mi-file.exp') diff --git a/gdb/testsuite/gdb.mi/mi-file.exp b/gdb/testsuite/gdb.mi/mi-file.exp index 811744e..0785c2b 100644 --- a/gdb/testsuite/gdb.mi/mi-file.exp +++ b/gdb/testsuite/gdb.mi/mi-file.exp @@ -18,11 +18,6 @@ load_lib mi-support.exp set MIFLAGS "-i=mi" -gdb_exit -if [mi_gdb_start] { - return -} - standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { @@ -30,8 +25,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb return -1 } -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir +if {[mi_clean_restart]} { + return +} mi_gdb_file_cmd ${binfile} proc test_file_list_exec_source_file {} { -- cgit v1.1