testsuite: Add ABIs to the test matrix; unify tests across ABIs

This eliminates all the *_win32.c tests in favor of the tests they were
branched from, and expands test coverage to run many more tests on
stdcall, thiscall, and fastcall.

This same mechanism also supports testing any other target that has
multiple ABIs.
This commit is contained in:
Josh Triplett
2014-03-16 20:29:27 -07:00
parent 4d4d368e5a
commit e48918ecf8
25 changed files with 90 additions and 423 deletions

View File

@@ -284,10 +284,33 @@ proc run-many-tests { testcases extra_flags } {
set optimizations { "" }
}
set targetabis { "" }
if [string match $using_gcc "yes"] {
if [istarget "i?86-*-*"] {
set targetabis {
""
"-DABI_NUM=FFI_STDCALL -DABI_ATTR=__STDCALL__"
"-DABI_NUM=FFI_THISCALL -DABI_ATTR=__THISCALL__"
"-DABI_NUM=FFI_FASTCALL -DABI_ATTR=__FASTCALL__"
}
}
}
set common [ concat $common $extra_flags ]
foreach opt $optimizations {
set options [ concat $common $opt ]
dg-runtest $testcases $options ""
foreach test $testcases {
set testname [file tail $test]
if [search_for $test "ABI_NUM"] {
set abis $targetabis
} else {
set abis { "" }
}
foreach opt $optimizations {
foreach abi $abis {
set options [concat $common $opt $abi]
verbose "Testing $testname, $options" 1
dg-test $test $options ""
}
}
}
}