testsuite: Factor out a function to run a matrix of tests

This commons up code from libffi.call/call.exp and
libffi.special/special.exp, unifies the optimization option matrix
between the two, and makes it easier to add more axes to the matrix
in the future.
This commit is contained in:
Josh Triplett
2014-03-16 16:04:58 -07:00
parent dfdb02cc86
commit 5695ec1444
3 changed files with 19 additions and 24 deletions

View File

@@ -19,17 +19,8 @@ libffi-init
global srcdir subdir
global cxx_options
set cxx_options " -shared-libgcc -lstdc++"
if { [string match $using_gcc "yes"] } {
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O0 -W -Wall"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O2"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-O3"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] $cxx_options "-Os"
run-many-tests [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] "-shared-libgcc -lstdc++"
}
dg-finish