prepare_for_testing.
* gdb.fortran/multi-dim.exp: Use standard_testfile.
* gdb.fortran/module.exp: Use standard_testfile.
* gdb.fortran/logical.exp: Use standard_testfile.
* gdb.fortran/library-module.exp: Use standard_testfile,
standard_output_file.
* gdb.fortran/derived-type.exp: Use standard_testfile,
prepare_for_testing.
* gdb.fortran/complex.exp: Use standard_testfile,
prepare_for_testing.
* gdb.fortran/charset.exp: Use standard_testfile.
* gdb.fortran/array-element.exp: Use standard_testfile,
prepare_for_testing.
+2012-06-25 Tom Tromey <tromey@redhat.com>
+
+ * gdb.fortran/subarray.exp: Use standard_testfile,
+ prepare_for_testing.
+ * gdb.fortran/multi-dim.exp: Use standard_testfile.
+ * gdb.fortran/module.exp: Use standard_testfile.
+ * gdb.fortran/logical.exp: Use standard_testfile.
+ * gdb.fortran/library-module.exp: Use standard_testfile,
+ standard_output_file.
+ * gdb.fortran/derived-type.exp: Use standard_testfile,
+ prepare_for_testing.
+ * gdb.fortran/complex.exp: Use standard_testfile,
+ prepare_for_testing.
+ * gdb.fortran/charset.exp: Use standard_testfile.
+ * gdb.fortran/array-element.exp: Use standard_testfile,
+ prepare_for_testing.
+
2012-06-25 Keith Seitz <keiths@redhat.com>
* gdb.mi/mi-break.exp (test_rbreak_creation_and_listing):
if { [skip_fortran_tests] } { return -1 }
-set testfile "array-element"
-set srcfile ${testfile}.f
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .f
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
- executable {debug f90}] != ""} {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
if ![runto sub_] then {
perror "couldn't run to breakpoint sub_"
continue
if { [skip_fortran_tests] } { return -1 }
-set testfile "charset"
-set srcfile ${testfile}.f90
+standard_testfile .f90
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug additional_flags=-fbackslash f90}] } {
return -1
}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set testfile "complex"
-set srcfile ${testfile}.f
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .f
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
- executable {debug f90 quiet}] != "" } {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 quiet}]} {
untested "Couldn't compile ${srcfile}"
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
if ![runto MAIN__] then {
perror "Couldn't run to MAIN__"
continue
if { [skip_fortran_tests] } { return -1 }
-set testfile "derived-type"
-set srcfile ${testfile}.f90
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .f90
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
- executable {debug f90}] != ""} {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
if ![runto MAIN__] then {
perror "couldn't run to breakpoint MAIN__"
continue
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set testfile "library-module"
-set srcfile ${testfile}-main.f90
+standard_testfile library-module-main.f90
set srclibfile ${testfile}-lib.f90
-set libfile ${testfile}-lib.so
-set binfile ${testfile}
+set libfile [standard_output_file ${testfile}-lib.so]
# Required for -fPIC by gdb_compile_shlib.
if [get_compiler_info] {
return -1
}
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f90}] != "" } {
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $libfile {debug f90}] != "" } {
untested "Couldn't compile ${srclibfile}"
return -1
}
# just for the linking phase (and not the source compilation phase). And any
# warnings on ignored $libfile abort the process.
-if { [gdb_compile $srcdir/$subdir/$srcfile $objdir/$subdir/$binfile executable [list debug f90 shlib=$objdir/$subdir/$libfile]] != "" } {
+if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug f90 shlib=$libfile]] != "" } {
untested "Couldn't compile ${srcfile}"
return -1
}
-clean_restart $binfile
+clean_restart $testfile
-gdb_load_shlibs $objdir/$subdir/$libfile
+gdb_load_shlibs $libfile
if ![runto MAIN__] then {
perror "couldn't run to breakpoint MAIN__"
# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
-set test "logical"
-set srcfile ${test}.f90
+standard_testfile .f90
-if { [prepare_for_testing "${test}.exp" "${test}" "${srcfile}" {debug f90 quiet}] } {
- untested "Could not compile ${srcfile}."
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 quiet}]} {
return -1
}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set testfile "module"
-set srcfile ${testfile}.f90
+standard_testfile .f90
if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}] } {
return -1
if { [skip_fortran_tests] } { return -1 }
-set testfile "multi-dim"
-set srcfile ${testfile}.f90
+standard_testfile .f90
+
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
return -1
}
if { [skip_fortran_tests] } { return -1 }
-set testfile "subarray"
-set srcfile ${testfile}.f
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .f
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
- executable {debug f90}] != ""} {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
return -1
}