2000-02-17 20:38:33 +01:00
|
|
|
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 {
|
2000-07-27 19:30:51 +02:00
|
|
|
ws_spawn "../cygrun ./$base.exe > /dev/null"
|
2000-02-17 20:38:33 +01:00
|
|
|
if { $rv != "" } {
|
|
|
|
verbose -log "$testcase: $rv"
|
|
|
|
fail "$testcase (execute)"
|
|
|
|
} else {
|
|
|
|
pass "$testcase"
|
|
|
|
file delete "$base.exe"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|