diff options
author | Mark Mitchell <mark@codesourcery.com> | 2005-03-24 04:26:30 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2005-03-24 04:26:30 +0000 |
commit | a53ed3ded702e70cf720a032e880756d3bd4ed0b (patch) | |
tree | 93ab0653b4688a32081137dcf0fff2e80027d5b4 | |
parent | 97e095fdc7191eea3d9bbf098c5feccc9446dc67 (diff) | |
download | gcc-a53ed3ded702e70cf720a032e880756d3bd4ed0b.zip gcc-a53ed3ded702e70cf720a032e880756d3bd4ed0b.tar.gz gcc-a53ed3ded702e70cf720a032e880756d3bd4ed0b.tar.bz2 |
normal.exp: Read testsuite_files, if it exists.
* testsuite/libstdc++-dg/normal.exp: Read testsuite_files, if it
exists.
From-SVN: r96980
-rw-r--r-- | libstdc++-v3/ChangeLog | 3 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/libstdc++-dg/normal.exp | 82 |
2 files changed, 57 insertions, 28 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 33b9873..1c25f78 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2005-03-23 Mark Mitchell <mark@codesourcery.com> + * testsuite/libstdc++-dg/normal.exp: Read testsuite_files, if it + exists. + * testsuite/lib/libstdc++.exp (libstdc++_wchar_t): Rename to ... (v3-wchar_t): ... this. (libstdc++_threads): Rename to ... diff --git a/libstdc++-v3/testsuite/libstdc++-dg/normal.exp b/libstdc++-v3/testsuite/libstdc++-dg/normal.exp index 29b16f2..746c7a8 100644 --- a/libstdc++-v3/testsuite/libstdc++-dg/normal.exp +++ b/libstdc++-v3/testsuite/libstdc++-dg/normal.exp @@ -24,36 +24,62 @@ dg-init # Build the support objects. v3-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 + +# If there is a "testsuite_files" file, use it. +# +# This is a workaround for problems reported with using: +# +# runtest normal.exp="`cat testsuite_files`" +# +# See: +# http://gcc.gnu.org/ml/libstdc++/2005-03/msg00278.html +# for discussion of the problem. +# +# If that worked consistently, we could modify "make check" to +# pass that option, and then remove this code. +if {[info exists blddir]} { + set tests_file "${blddir}/testsuite/testsuite_files" +} +if {[info exists tests_file] && [file exists $tests_file]} { + set f [open $tests_file] + while { ! [eof $f] } { + set t [gets $f] + if { [string length "$t"] != 0 } { + lappend tests ${srcdir}/${t} } - # 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 - && (${v3-wchar_t} || [string first wchar_t $t] == -1) - && (${v3-threads} || [string first thread $t] == -1) } { - lappend tests $t + } + close $f +} else { + # 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. + 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 really 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 + && (${v3-wchar_t} || [string first wchar_t $t] == -1) + && (${v3-threads} || [string first thread $t] == -1) } { + lappend tests $t + } } } } |