aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-04-25 12:49:17 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-04-25 12:49:17 +0000
commit6a3936d48b36c09a5f7654ae2bc3a62d688bd414 (patch)
tree2e44a99af127e003df35649478c455d8f2298cec
parent9dd958d2d16fe7b6869392682e693a65bf1e26be (diff)
downloadgcc-6a3936d48b36c09a5f7654ae2bc3a62d688bd414.zip
gcc-6a3936d48b36c09a5f7654ae2bc3a62d688bd414.tar.gz
gcc-6a3936d48b36c09a5f7654ae2bc3a62d688bd414.tar.bz2
dg.exp (find-cxx-tests): New function.
* g++.dg/dg.exp (find-cxx-tests): New function. (main): Use it, remove explicit pruning From-SVN: r247215
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/dg.exp42
2 files changed, 18 insertions, 29 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 576838e..5495f78 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-25 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/dg.exp (find-cxx-tests): New function.
+ (main): Use it, remove explicit pruning
+
2017-04-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/80492
diff --git a/gcc/testsuite/g++.dg/dg.exp b/gcc/testsuite/g++.dg/dg.exp
index d760087..940213d 100644
--- a/gcc/testsuite/g++.dg/dg.exp
+++ b/gcc/testsuite/g++.dg/dg.exp
@@ -29,35 +29,19 @@ if ![info exists DEFAULT_CXXFLAGS] then {
# Initialize `dg'.
dg-init
-# Gather a list of all tests, with the exception of those in directories
-# that are handled specially.
-set tests [lsort [find $srcdir/$subdir *.C]]
-set tests [prune $tests $srcdir/$subdir/bprob/*]
-set tests [prune $tests $srcdir/$subdir/charset/*]
-set tests [prune $tests $srcdir/$subdir/cilk-plus/AN/*]
-set tests [prune $tests $srcdir/$subdir/compat/*]
-set tests [prune $tests $srcdir/$subdir/debug/*]
-set tests [prune $tests $srcdir/$subdir/dfp/*]
-set tests [prune $tests $srcdir/$subdir/gcov/*]
-set tests [prune $tests $srcdir/$subdir/lto/*]
-set tests [prune $tests $srcdir/$subdir/pch/*]
-set tests [prune $tests $srcdir/$subdir/plugin/*]
-set tests [prune $tests $srcdir/$subdir/special/*]
-set tests [prune $tests $srcdir/$subdir/tls/*]
-set tests [prune $tests $srcdir/$subdir/vect/*]
-set tests [prune $tests $srcdir/$subdir/goacc/*]
-set tests [prune $tests $srcdir/$subdir/goacc-gomp/*]
-set tests [prune $tests $srcdir/$subdir/gomp/*]
-set tests [prune $tests $srcdir/$subdir/tree-prof/*]
-set tests [prune $tests $srcdir/$subdir/torture/*]
-set tests [prune $tests $srcdir/$subdir/graphite/*]
-set tests [prune $tests $srcdir/$subdir/tm/*]
-set tests [prune $tests $srcdir/$subdir/cilk-plus/*]
-set tests [prune $tests $srcdir/$subdir/guality/*]
-set tests [prune $tests $srcdir/$subdir/simulate-thread/*]
-set tests [prune $tests $srcdir/$subdir/asan/*]
-set tests [prune $tests $srcdir/$subdir/ubsan/*]
-set tests [prune $tests $srcdir/$subdir/tsan/*]
+# Recursively find files in $dir and subdirs, do not walk into subdirs
+# that contain their own .exp file.
+proc find-cxx-tests { dir suffix } {
+ set tests [lsort [glob -nocomplain -directory $dir "*.$suffix" ]]
+ foreach subdir [lsort [glob -nocomplain -type d -directory $dir *]] {
+ if { [glob -nocomplain -directory $subdir *.exp] eq "" } {
+ lappend tests {*}[find-cxx-tests $subdir $suffix]
+ }
+ }
+ return $tests
+}
+
+set tests [find-cxx-tests $srcdir/$subdir {C}]
# Main loop.
g++-dg-runtest $tests "" $DEFAULT_CXXFLAGS