This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libstdc++] Limiting testsuite runs to particular checks
- From: Phil Edwards <phil at jaj dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 Mar 2002 16:14:19 -0500
- Subject: [libstdc++] Limiting testsuite runs to particular checks
See the brief exchange on the libstdc++ list around the 5th and 6th
of this month. Basically, using RUNTESTFLAGS to pare down the list of
regressions tests doesn't seem to work with target libraries. At least,
we haven't been able to figure out the syntax.
This provides an alternative (the same one we've used for mkcheck).
Tested on i686-linux nightly for six or seven months now. :-)
2002-03-11 Phil Edwards <pme@gcc.gnu.org>
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-list-sourcefiles):
New function. Build the list of tests to run in testsuite_files.
* testsuite/libstdc++-v3.dg/dg.exp: Use it.
Index: testsuite/lib/libstdc++-v3-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp,v
retrieving revision 1.13
diff -u -3 -p -r1.13 libstdc++-v3-dg.exp
--- libstdc++-v3-dg.exp 2002/01/28 22:13:12 1.13
+++ libstdc++-v3-dg.exp 2002/03/11 21:09:30
@@ -176,3 +176,38 @@ proc libstdc++-v3_target_compile { sourc
return [target_compile $source $dest $type $options]
}
+
+# A bit sloppy... Returns a list of source files (full pathnames) to
+# compile. We mimic the mkcheck script in that the first time this is run,
+# all existing files are listed in "testsuite_files" in the output
+# directory. Subsequent runs pull the list from that file, allowing users
+# to trim the list down to problematic tests.
+### This is supposed to be done via RUNTESTFLAGS, but that doesn't work.
+proc libstdc++-v3-list-sourcefiles { } {
+ global srcdir
+ global outdir
+
+ set files_file "${outdir}/testsuite_files"
+ set sfiles ""
+ if { [file exists $files_file] } {
+ set f [open $files_file]
+ while { ! [eof $f] } {
+ set t [gets $f]
+ if { [string length "$t"] != 0 } {
+ lappend sfiles ${srcdir}/${t}
+ }
+ }
+ } else {
+ set f [open $files_file "w"]
+ set where_we_were [pwd]
+ cd $srcdir
+ foreach s [lsort [glob -nocomplain */*.cc]] {
+ lappend sfiles ${srcdir}/${s}
+ puts $f $s
+ }
+ cd $where_we_were
+ }
+ close $f
+ return $sfiles
+}
+
Index: testsuite/libstdc++-v3.dg/dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/libstdc++-v3.dg/dg.exp,v
retrieving revision 1.1
diff -u -3 -p -r1.1 dg.exp
--- dg.exp 2001/05/12 17:49:16 1.1
+++ dg.exp 2002/03/11 21:09:30
@@ -1,4 +1,4 @@
-# Copyright (C) 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
# 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
@@ -40,8 +40,7 @@ remote_exec host ${shell-ulimit-command}
remote_exec host ${shell-ulimit-command} "-v ${maximum-memory-usage}"
# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/*/*.cc]] \
- "" $DEFAULT_CXXFLAGS
+dg-runtest [libstdc++-v3-list-sourcefiles] "" $DEFAULT_CXXFLAGS
# All done.
dg-finish