summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/gfortran-dg.exp
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-16 00:32:26 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-16 00:32:26 +0000
commit5a242bf7af062274fdb22fd00f495ff6edd26450 (patch)
tree0caede859daafa3ef079e9bd49843a8193a577eb /gcc/testsuite/lib/gfortran-dg.exp
parent5c0f511f35f5e74a6dbedf1bb6ccd8a19396d6a6 (diff)
downloadgcc-5a242bf7af062274fdb22fd00f495ff6edd26450.tar.gz
* lib/fortran-torture.exp (fortran-torture): Don't test compile
tests with fulllist of options. * lib/gfortran-dg.exp (gfortran-dg-runtest): Only test with all of TORTURE_OPTIONS if test contains 'dg-do run'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84792 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib/gfortran-dg.exp')
-rw-r--r--gcc/testsuite/lib/gfortran-dg.exp26
1 files changed, 25 insertions, 1 deletions
diff --git a/gcc/testsuite/lib/gfortran-dg.exp b/gcc/testsuite/lib/gfortran-dg.exp
index 903d380c02d..2387403030b 100644
--- a/gcc/testsuite/lib/gfortran-dg.exp
+++ b/gcc/testsuite/lib/gfortran-dg.exp
@@ -43,5 +43,29 @@ proc gfortran-dg-prune { system text } {
# Modified dg-runtest that can cycle through a list of optimization options
# as c-torture does.
proc gfortran-dg-runtest { testcases default-extra-flags } {
- return [gcc-dg-runtest $testcases ${default-extra-flags}]
+ global runtests
+ global TORTURE_OPTIONS
+
+ foreach test $testcases {
+ # If we're only testing specific files and this isn't one of
+ # them, skip it.
+ if ![runtest_file_p $runtests $test] {
+ continue
+ }
+
+ # look if this is dg-do-run test, in which case
+ # we cycle through the option list, otherwise we don't
+ if [expr [search_for $test "dg-do run"]] {
+ set option_list $TORTURE_OPTIONS
+ } else {
+ set option_list [list { -O } ]
+ }
+
+ set nshort [file tail [file dirname $test]]/[file tail $test]
+
+ foreach flags $option_list {
+ verbose "Testing $nshort, $flags" 1
+ dg-test $test $flags ${default-extra-flags}
+ }
+ }
}