diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 17 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/array-element.exp | 12 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/charset.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/complex.exp | 12 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/derived-type.exp | 12 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/library-module.exp | 14 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/logical.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/module.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/multi-dim.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/subarray.exp | 7 |
10 files changed, 37 insertions, 53 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d2d1cae..44637aa 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -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): diff --git a/gdb/testsuite/gdb.fortran/array-element.exp b/gdb/testsuite/gdb.fortran/array-element.exp index 9150a45..90c42d1 100644 --- a/gdb/testsuite/gdb.fortran/array-element.exp +++ b/gdb/testsuite/gdb.fortran/array-element.exp @@ -20,20 +20,12 @@ 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 diff --git a/gdb/testsuite/gdb.fortran/charset.exp b/gdb/testsuite/gdb.fortran/charset.exp index 08ea9fa..15ec9ef 100644 --- a/gdb/testsuite/gdb.fortran/charset.exp +++ b/gdb/testsuite/gdb.fortran/charset.exp @@ -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 } diff --git a/gdb/testsuite/gdb.fortran/complex.exp b/gdb/testsuite/gdb.fortran/complex.exp index 3b05995..a37abef 100644 --- a/gdb/testsuite/gdb.fortran/complex.exp +++ b/gdb/testsuite/gdb.fortran/complex.exp @@ -13,21 +13,13 @@ # 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 diff --git a/gdb/testsuite/gdb.fortran/derived-type.exp b/gdb/testsuite/gdb.fortran/derived-type.exp index b131da5..0623019 100644 --- a/gdb/testsuite/gdb.fortran/derived-type.exp +++ b/gdb/testsuite/gdb.fortran/derived-type.exp @@ -20,20 +20,12 @@ 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 diff --git a/gdb/testsuite/gdb.fortran/library-module.exp b/gdb/testsuite/gdb.fortran/library-module.exp index 75b0695..9db5ab1 100644 --- a/gdb/testsuite/gdb.fortran/library-module.exp +++ b/gdb/testsuite/gdb.fortran/library-module.exp @@ -13,11 +13,9 @@ # 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__" diff --git a/gdb/testsuite/gdb.fortran/logical.exp b/gdb/testsuite/gdb.fortran/logical.exp index 116f598..f7f1bf1 100644 --- a/gdb/testsuite/gdb.fortran/logical.exp +++ b/gdb/testsuite/gdb.fortran/logical.exp @@ -16,11 +16,9 @@ # 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 } diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp index 5fea4c5..3517ef7 100644 --- a/gdb/testsuite/gdb.fortran/module.exp +++ b/gdb/testsuite/gdb.fortran/module.exp @@ -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 diff --git a/gdb/testsuite/gdb.fortran/multi-dim.exp b/gdb/testsuite/gdb.fortran/multi-dim.exp index b300cf2..365abd0 100644 --- a/gdb/testsuite/gdb.fortran/multi-dim.exp +++ b/gdb/testsuite/gdb.fortran/multi-dim.exp @@ -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 } diff --git a/gdb/testsuite/gdb.fortran/subarray.exp b/gdb/testsuite/gdb.fortran/subarray.exp index d43c85a..ec23b32 100644 --- a/gdb/testsuite/gdb.fortran/subarray.exp +++ b/gdb/testsuite/gdb.fortran/subarray.exp @@ -20,12 +20,9 @@ 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 } |