newlib/winsup/testsuite/winsup.api/winsup.exp
DJ Delorie d0b178fe3a * testsuite/winsup.api/winsup.exp: ignore stdout by default
* testsuite/winsup.api/crlf.c: non-verbose by default

* winsup.h: prune out windows headers we don't normally need
* assert.cc: add wingdi.h and winuser.h
* fhandler_console.cc: ditto
* fhandler_windows.cc: ditto
* select.cc: ditto
* spawn.cc: ditto
* strace.cc: ditto
* tty.cc: ditto
* window.cc: ditto
* hinfo.cc: add winsock.h
* syscalls.cc: add winnls.h
* uinfo.cc: ditto

* include/windows.h: optimize non-inclusion of repeat headers
2000-07-27 17:30:51 +00:00

44 lines
947 B
Plaintext

source "site.exp"
if { ! [isnative] } {
verbose "skipping winsup.api because it's not native"
return
}
set rv ""
proc ws_spawn {cmd args} {
global rv
verbose "running $cmd\n"
catch [eval "exec $cmd"] rv
verbose send "catchCode = $rv\n"
}
foreach src [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.c] {
regsub "^$srcdir/$subdir/" $src "" testcase
regsub ".c$" $testcase "" base
regsub ".*/" $base "" basename
regsub "/" $base "-" base
if { [regexp "^xf-" $basename] } {
setup_xfail "*-*-*"
} else {
clear_xfail
}
ws_spawn "$CC $src $rootme/new-libcygwin.a -o $base.exe"
if { $rv != "" } {
verbose -log "$rv"
fail "$testcase (compile)"
} else {
ws_spawn "../cygrun ./$base.exe > /dev/null"
if { $rv != "" } {
verbose -log "$testcase: $rv"
fail "$testcase (execute)"
} else {
pass "$testcase"
file delete "$base.exe"
}
}
}