* gdb.fortran/subarray.exp: Use standard_testfile,
authorTom Tromey <tromey@redhat.com>
Mon, 25 Jun 2012 20:51:35 +0000 (20:51 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 25 Jun 2012 20:51:35 +0000 (20:51 +0000)
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.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/array-element.exp
gdb/testsuite/gdb.fortran/charset.exp
gdb/testsuite/gdb.fortran/complex.exp
gdb/testsuite/gdb.fortran/derived-type.exp
gdb/testsuite/gdb.fortran/library-module.exp
gdb/testsuite/gdb.fortran/logical.exp
gdb/testsuite/gdb.fortran/module.exp
gdb/testsuite/gdb.fortran/multi-dim.exp
gdb/testsuite/gdb.fortran/subarray.exp

index d2d1cae..44637aa 100644 (file)
@@ -1,3 +1,20 @@
+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):
index 9150a45..90c42d1 100644 (file)
 
 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
index 08ea9fa..15ec9ef 100644 (file)
@@ -18,8 +18,7 @@
 
 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
 }
index 3b05995..a37abef 100644 (file)
 # 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
index b131da5..0623019 100644 (file)
 
 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
index 75b0695..9db5ab1 100644 (file)
 # 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] {
@@ -25,7 +23,7 @@ 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
 }
@@ -34,14 +32,14 @@ if  { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$li
 # 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__"
index 116f598..f7f1bf1 100644 (file)
 
 # 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
 }
 
index 5fea4c5..3517ef7 100644 (file)
@@ -13,8 +13,7 @@
 # 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
index b300cf2..365abd0 100644 (file)
@@ -18,8 +18,8 @@
 
 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
 }
index d43c85a..ec23b32 100644 (file)
 
 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
 }