| 1 |
# Copyright (C) 2003, 2006, 2009, 2010, 2014, 2018 Free Software Foundation, Inc. |
| 2 |
|
| 3 |
# This program is free software; you can redistribute it and/or modify |
| 4 |
# it under the terms of the GNU General Public License as published by |
| 5 |
# the Free Software Foundation; either version 3 of the License, or |
| 6 |
# (at your option) any later version. |
| 7 |
# |
| 8 |
# This program is distributed in the hope that it will be useful, |
| 9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
# GNU General Public License for more details. |
| 12 |
# |
| 13 |
# You should have received a copy of the GNU General Public License |
| 14 |
# along with this program; see the file COPYING3. If not see |
| 15 |
# <http://www.gnu.org/licenses/>. |
| 16 |
|
| 17 |
dg-init |
| 18 |
libffi-init |
| 19 |
|
| 20 |
global srcdir subdir |
| 21 |
global compiler_vendor |
| 22 |
|
| 23 |
# The conversion of this testsuite into a dejagnu compatible testsuite |
| 24 |
# was done in a pretty lazy fashion, and requires the use of compiler |
| 25 |
# flags to disable warnings for now. |
| 26 |
if { [string match $compiler_vendor "gnu"] } { |
| 27 |
set warning_options "-Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-uninitialized"; |
| 28 |
} |
| 29 |
if { [string match $compiler_vendor "microsoft"] } { |
| 30 |
# -wd4996 suggest use of vsprintf_s instead of vsprintf |
| 31 |
# -wd4116 unnamed type definition |
| 32 |
# -wd4101 unreferenced local variable |
| 33 |
# -wd4244 warning about implicit double to float conversion |
| 34 |
set warning_options "-wd4996 -wd4116 -wd4101 -wd4244"; |
| 35 |
} |
| 36 |
if { ![string match $compiler_vendor "microsoft"] && ![string match $compiler_vendor "gnu"] } { |
| 37 |
set warning_options "-Wno-unused-variable -Wno-unused-parameter -Wno-uninitialized"; |
| 38 |
} |
| 39 |
|
| 40 |
|
| 41 |
set tlist [lsort [glob -nocomplain -- $srcdir/$subdir/test-call.c]] |
| 42 |
|
| 43 |
for {set i 1} {$i < 82} {incr i} { |
| 44 |
run-many-tests $tlist [format "-DDGTEST=%d %s" $i $warning_options] |
| 45 |
} |
| 46 |
|
| 47 |
set tlist [lsort [glob -nocomplain -- $srcdir/$subdir/test-callback.c]] |
| 48 |
|
| 49 |
for {set i 1} {$i < 81} {incr i} { |
| 50 |
if { [libffi_feature_test "#if FFI_CLOSURES"] } { |
| 51 |
run-many-tests $tlist [format "-DDGTEST=%d %s" $i $warning_options] |
| 52 |
} else { |
| 53 |
foreach test $tlist { |
| 54 |
unsupported [format "%s -DDGTEST=%d %s" $test $i $warning_options] |
| 55 |
} |
| 56 |
} |
| 57 |
} |
| 58 |
|
| 59 |
dg-finish |
| 60 |
|
| 61 |
# Local Variables: |
| 62 |
# tcl-indent-level:4 |
| 63 |
# End: |