]>
Commit | Line | Data |
---|---|---|
23834577 | 1 | # Primary test file for libstdc++. |
c66ce1f5 | 2 | |
23834577 PE |
3 | # Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
4 | # | |
c66ce1f5 BK |
5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | |
7 | # the Free Software Foundation; either version 2 of the License, or | |
8 | # (at your option) any later version. | |
9 | # | |
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU General Public License | |
16 | # along with this program; if not, write to the Free Software | |
83f51799 | 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
c66ce1f5 BK |
18 | |
19 | # libstdc++-v3 testsuite that uses the 'dg.exp' driver. | |
20 | ||
70a84160 BK |
21 | # Initialization. |
22 | dg-init | |
c66ce1f5 | 23 | |
0b3deaaf | 24 | # Build the support objects. |
0b694555 | 25 | v3-build_support |
0b3deaaf | 26 | |
0b3deaaf | 27 | set tests [list] |
a53ed3de MM |
28 | |
29 | # If there is a "testsuite_files" file, use it. | |
30 | # | |
31 | # This is a workaround for problems reported with using: | |
32 | # | |
33 | # runtest normal.exp="`cat testsuite_files`" | |
34 | # | |
35 | # See: | |
36 | # http://gcc.gnu.org/ml/libstdc++/2005-03/msg00278.html | |
37 | # for discussion of the problem. | |
38 | # | |
39 | # If that worked consistently, we could modify "make check" to | |
40 | # pass that option, and then remove this code. | |
41 | if {[info exists blddir]} { | |
42 | set tests_file "${blddir}/testsuite/testsuite_files" | |
43 | } | |
44 | if {[info exists tests_file] && [file exists $tests_file]} { | |
45 | set f [open $tests_file] | |
46 | while { ! [eof $f] } { | |
47 | set t [gets $f] | |
48 | if { [string length "$t"] != 0 } { | |
49 | lappend tests ${srcdir}/${t} | |
0b3deaaf | 50 | } |
a53ed3de MM |
51 | } |
52 | close $f | |
53 | } else { | |
54 | # Find directories that might have tests. | |
55 | set subdirs [glob "$srcdir/\[0-9\]\[0-9\]*"] | |
56 | foreach d [glob "$srcdir/\[a-z\]*"] { | |
57 | if {[file isdirectory $d]} { | |
58 | lappend subdirs $d | |
59 | } | |
60 | } | |
61 | # Find all the tests. | |
62 | foreach s $subdirs { | |
63 | set subdir_tests [find $s *.cc] | |
64 | # Filter out tests that should not be run. | |
65 | foreach t $subdir_tests { | |
66 | # The DejaGNU "find" procedure sometimes returns a list | |
67 | # containing an empty string, when it should really return | |
68 | # an empty list. | |
69 | if { $t == "" } { | |
70 | continue | |
71 | } | |
72 | # Filter out: | |
73 | # 1. interactive tests. | |
74 | # 2. performance tests. | |
75 | # 3. wchar_t tests, if not supported. | |
76 | # 4. thread tests, if not supported. | |
77 | if { [string first _xin $t] == -1 | |
78 | && [string first performance $t] == -1 | |
79 | && (${v3-wchar_t} || [string first wchar_t $t] == -1) | |
80 | && (${v3-threads} || [string first thread $t] == -1) } { | |
81 | lappend tests $t | |
82 | } | |
0b3deaaf MM |
83 | } |
84 | } | |
85 | } | |
86 | set tests [lsort $tests] | |
87 | ||
c66ce1f5 | 88 | # Main loop. |
23834577 | 89 | global DEFAULT_CXXFLAGS |
8b60fb43 MM |
90 | global PCH_CXXFLAGS |
91 | dg-runtest $tests "" "$DEFAULT_CXXFLAGS $PCH_CXXFLAGS" | |
c66ce1f5 BK |
92 | |
93 | # All done. | |
94 | dg-finish |