newlib/winsup/testsuite/winsup.api/winsup.exp
Egor Duda d961def403 * winsup.api/ltp/dup03.c: New test.
* winsup.api/ltp/lseek03.c: Ditto.
* winsup.api/ltp/mmap001.c: Ditto.
* winsup.api/ltp/read01.c: Ditto.
* winsup.api/ltp/readdir01.c: Ditto.
* winsup.api/ltp/rmdir05.c: Ditto.
* winsup.api/ltp/sbrk01.c: Ditto.
* winsup.api/ltp/select02.c: Ditto.
* winsup.api/ltp/select03.c: Ditto.
* winsup.api/ltp/signal03.c: Ditto.
* winsup.api/ltp/stat06.c: Ditto.
* winsup.api/ltp/unlink08.c: Ditto.
* winsup.api/known_bugs.tcl: Update to reflect new test's known
failures.
* winsup.api/winsup.exp: Don't delete executable in case of
unexpected pass, as well as in case of unexpected failure.
* README: Update paragraph about expected failures.
2001-09-09 13:38:17 +00:00

73 lines
1.8 KiB
Plaintext

source "site.exp"
source "$srcdir/winsup.api/known_bugs.tcl"
if { ! [isnative] } {
verbose "skipping winsup.api because it's not native"
return
}
set rv ""
set add_includes ""
set add_libs ""
set ltp_includes "-I$ltp_includes"
set ltp_libs "$rootme/libltp.a"
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 { [lsearch -exact $xfail_list $basename] >= 0 } {
set xfail_expected 1
setup_xfail "*-*-*"
} else {
set xfail_expected 0
clear_xfail
}
if { [regexp "^ltp/" $testcase ] } {
set add_includes $ltp_includes
set add_libs $ltp_libs
}
ws_spawn "$CC -g3 $CFLAGS $src $add_includes $add_libs $runtime_root/binmode.o $runtime_root/new-libcygwin.a -o $base.exe"
if { $rv != "" } {
verbose -log "$rv"
fail "$testcase (compile)"
} else {
if { $verbose } {
set redirect_output "./$base.log"
} else {
set redirect_output /dev/null
}
ws_spawn "$runtime_root/cygrun ./$base.exe > $redirect_output"
if { $rv != "" } {
verbose -log "$testcase: $rv"
fail "$testcase (execute)"
if { $xfail_expected } {
catch { file delete "$base.exe" } err
if { $err != "" } {
note "error deleting $base.exe: $err"
}
}
} else {
pass "$testcase"
if { ! $xfail_expected } {
catch { file delete "$base.exe" } err
if { $err != "" } {
note "error deleting $base.exe: $err"
}
}
}
}
}