2004-02-27 23:01:32 +01:00
|
|
|
# Primary test file for libstdc++.
|
2001-05-12 19:49:16 +02:00
|
|
|
|
2004-02-27 23:01:32 +01:00
|
|
|
# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
|
|
|
#
|
2001-05-12 19:49:16 +02:00
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
# libstdc++-v3 testsuite that uses the 'dg.exp' driver.
|
|
|
|
|
2003-12-22 21:09:23 +01:00
|
|
|
# Initialization.
|
|
|
|
dg-init
|
2001-05-12 19:49:16 +02:00
|
|
|
|
2005-03-23 17:45:45 +01:00
|
|
|
# Build the support objects.
|
|
|
|
libstdc++_build_support
|
|
|
|
|
|
|
|
# Find directories that might have tests.
|
|
|
|
set subdirs [glob "$srcdir/\[0-9\]\[0-9\]*"]
|
|
|
|
foreach d [glob "$srcdir/\[a-z\]*"] {
|
|
|
|
if {[file isdirectory $d]} {
|
|
|
|
lappend subdirs $d
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Find all the tests.
|
|
|
|
set tests [list]
|
|
|
|
foreach s $subdirs {
|
|
|
|
set subdir_tests [find $s *.cc]
|
|
|
|
# Filter out tests that should not be run.
|
|
|
|
foreach t $subdir_tests {
|
|
|
|
# The DejaGNU "find" procedure sometimes returns a list
|
|
|
|
# containing an empty string, when it should realy return
|
|
|
|
# an empty list.
|
|
|
|
if { $t == "" } {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
# Filter out:
|
|
|
|
# 1. interactive tests.
|
|
|
|
# 2. performance tests.
|
|
|
|
# 3. wchar_t tests, if not supported.
|
|
|
|
# 4. thread tests, if not supported.
|
|
|
|
if { [string first _xin $t] == -1
|
|
|
|
&& [string first performance $t] == -1
|
|
|
|
&& (${libstdc++_wchar_t} || [string first wchar_t $t] == -1)
|
|
|
|
&& (${libstdc++_threads} || [string first thread $t] == -1) } {
|
|
|
|
lappend tests $t
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
set tests [lsort $tests]
|
|
|
|
|
2001-05-12 19:49:16 +02:00
|
|
|
# Main loop.
|
2004-02-27 23:01:32 +01:00
|
|
|
global DEFAULT_CXXFLAGS
|
2005-03-23 17:45:45 +01:00
|
|
|
dg-runtest $tests "" $DEFAULT_CXXFLAGS
|
2001-05-12 19:49:16 +02:00
|
|
|
|
|
|
|
# All done.
|
|
|
|
dg-finish
|