* 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 d2d1caede7fb91acb2d3fb303e8804f09ede2ab8..44637aae6c37295a3c0ee6d89e94b171a24165ee 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 9150a459ac0c666ac4fb0b6e3f3fee3bee362cf1..90c42d1c507b2d5e262ed188b9927a046e75ae53 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 08ea9fa721e4f9ce5912675bcc58167dc6374a00..15ec9effe8bbf3cc149680c31fa1e11a3cb9a519 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 3b05995a36ed667facd0e88152bae0c15828b1fe..a37abef1a1259de406ea134c97f18b069ccf9f63 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 b131da52da4a61e4f38a4959f202049de292ece0..0623019781e8b915521a6fd1372b782fd13ef934 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 75b0695ee0b4748a99e347b0c0f3bf3adbd751e4..9db5ab1ea216d900804ccabcde1e0e913e3beeaf 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 116f5987642b06030368bc475d04021e70bb94f3..f7f1bf1e908240c1ef72bca92dcdcfd4c15326f1 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 5fea4c5c7aa4397d344b6da359df6cfb9e067d4d..3517ef7fa90fd8566944efd4e86394ab796e655e 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 b300cf2990c3aeee61844e0b9360d7d4f1146435..365abd0422fedeed2d72f23f4472f045579e56bc 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 d43c85a67be4c0236e9e0f9f3406d9cd211344d1..ec23b32d60d918c1dabdb515df3d2bb07e34c077 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
 }