]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.base/mips_pro.exp
test suite update - gdb.base/[h-m]
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / mips_pro.exp
index 2c8e9967a904e72c2e2376ab3d38f69bf5692940..72e198142c8a9cfb5ede0fe8187ad3de8b3ffa92 100644 (file)
@@ -14,9 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-set testfile mips_pro
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 # Create and source the file that provides information about the compiler
 # used to compile the test case.
@@ -27,23 +25,15 @@ if [get_compiler_info] {
 
 # This test must be compiled with -O2 if using gcc.
 
+set options debug
 if { [test_compiler_info gcc-*-*] } then {
-    if  { [gdb_compile "${srcdir}/$subdir/${srcfile}" "${binfile}" \
-           executable {debug additional_flags=-O2 additional_flags=-fno-inline}] != "" } {
-     untested mips_pro.exp
-     return -1
-    }
-} else {
-    if  { [gdb_compile "${srcdir}/$subdir/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     untested mips_pro.exp
-     return -1
-    }
+    lappend options additional_flags=-O2 additional_flags=-fno-inline
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+if {[prepare_for_testing $testfile.exp $testfile $srcfile $options]} {
+    untested $testfile.exp
+    return -1
+}
 
 if [runto middle] then {
     # PR 3016