FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / old-deja.exp
blobba9b7ffb707b43c0e7ccfe6e1f9f54d29207dc20
1 # Copyright (C) 1988, 90, 91, 92, 1994, 1997, 2000 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 # This file was written by Rob Savoye. (rob@cygnus.com)
20 # these tests come from the original DejaGnu test suite
21 # developed at Cygnus Support. If this isn't deja gnu, I
22 # don't know what is...
25 # load support procs
26 load_lib old-dejagnu.exp
27 load_lib g++.exp
30 # When a testcase doesn't have any special options, use these.
31 if ![info exists DEFAULT_CXXFLAGS] {
32 set DEFAULT_CXXFLAGS "-ansi -pedantic-errors -Wno-long-long"
36 old-dejagnu-init
37 global GXX_UNDER_TEST
40 # main test loop
43 set dirlen [expr [string length "$srcdir/$subdir"] + 1];
44 foreach file [lsort [find $srcdir/$subdir *.C]] {
45 # If we're only testing specific files and this isn't one of them, skip it.
46 set tfile [string range $file $dirlen end];
47 if ![runtest_file_p $runtests $tfile] then {
48 continue
50 verbose "Testing $file"
52 # We don't want old-dejagnu.exp to have to know about all the global
53 # variables we use. For now we tell it about CXXFLAGS and LIBS and
54 # leave LDFLAGS alone.
55 old-dejagnu $GXX_UNDER_TEST "$file" "$tfile" "" "$DEFAULT_CXXFLAGS" "-lstdc++"
58 # The framework doesn't like to see any error remnants,
59 # so remove them.
60 if [info exists errorInfo] then {
61 unset errorInfo