FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / gcc.dg / format / format.exp
blobb9eaf4122923fc2ddfbf8b87c08297db195dabdc
1 # Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 # Don't run this directory with any default CFLAGS, but run tests with
18 # and without -DWIDE.
20 if [info exists TORTURE_OPTIONS] {
21 set old_TORTURE_OPTIONS $TORTURE_OPTIONS
22 } elseif [info exists old_TORTURE_OPTIONS] {
23 unset old_TORTURE_OPTIONS
25 if [info exists torture_with_loops] {
26 set old_torture_with_loops $torture_with_loops
27 } elseif [info exists old_torture_with_loops] {
28 unset old_torture_with_loops
30 if [info exists torture_without_loops] {
31 set old_torture_without_loops $torture_without_loops
32 } elseif [info exists old_torture_without_loops] {
33 unset old_torture_without_loops
35 set TORTURE_OPTIONS [list { } { -DWIDE } ]
36 set torture_with_loops [list { } { -DWIDE } ]
37 set torture_without_loops [list { } { -DWIDE } ]
39 # Need to copy the format.h header.
40 if [is_remote host] {
41 remote_download host $srcdir/$subdir/format.h
44 load_lib gcc-dg.exp
46 dg-init
47 gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] ""
48 if [info exists old_TORTURE_OPTIONS] {
49 set TORTURE_OPTIONS $old_TORTURE_OPTIONS
50 } else {
51 unset TORTURE_OPTIONS
53 if [info exists old_torture_with_loops] {
54 set torture_with_loops $old_torture_with_loops
55 } else {
56 unset torture_with_loops
58 if [info exists old_torture_without_loops] {
59 set torture_without_loops $old_torture_without_loops
60 } else {
61 unset torture_without_loops
63 dg-finish