summaryrefslogtreecommitdiffstats
path: root/winsup/testsuite/winsup.api/winsup.exp
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-01-02 06:15:58 +0000
committerChristopher Faylor <me@cgf.cx>2006-01-02 06:15:58 +0000
commit7f9832e774a4b4a5bf7a7cbf31d22d11791fab48 (patch)
tree93716c3e0ca09beb4d1380339efb1c212a461645 /winsup/testsuite/winsup.api/winsup.exp
parentb0b9ccf6181f75f4c1363e3a8d65a0b9ebda63d5 (diff)
downloadcygnal-7f9832e774a4b4a5bf7a7cbf31d22d11791fab48.tar.gz
cygnal-7f9832e774a4b4a5bf7a7cbf31d22d11791fab48.tar.bz2
cygnal-7f9832e774a4b4a5bf7a7cbf31d22d11791fab48.zip
* cygload/README: Delete.
* cygload/cygload.cc: Move to winsup.api. Add comments from README. * cygload/cygload.h: Move to winsup.api. * cygload/cygload.exp: Move to winsup.api. * Makefile.in: Remove cygload. * winsup.api/winsup.exp: If a .exp file is detected, run it rather than using standard compile. * winsup.api/resethand.c (main): Use printf to print status or expect thinks something is wrong.
Diffstat (limited to 'winsup/testsuite/winsup.api/winsup.exp')
-rw-r--r--winsup/testsuite/winsup.api/winsup.exp54
1 files changed, 29 insertions, 25 deletions
diff --git a/winsup/testsuite/winsup.api/winsup.exp b/winsup/testsuite/winsup.api/winsup.exp
index 26d3af0d2..639096267 100644
--- a/winsup/testsuite/winsup.api/winsup.exp
+++ b/winsup/testsuite/winsup.api/winsup.exp
@@ -29,7 +29,7 @@ proc ws_spawn {cmd args} {
verbose "Filter: $test_filter"
-foreach src [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.c] {
+foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.{cc,c}]] {
if { $test_filter != "" && ! [regexp $test_filter $src] } {
verbose -log "Skipping $src"
continue
@@ -48,32 +48,36 @@ foreach src [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.c] {
clear_xfail
}
- ws_spawn "$CC -nodefaultlibs -mwin32 $CFLAGS $src $add_includes $add_libs $runtime_root/binmode.o -lgcc $runtime_root/libcygwin0.a -lkernel32 -luser32 -o $base.exe"
- if { $rv != "" } {
- verbose -log "$rv"
- fail "$testcase (compile)"
+ if [ file exists "$srcdir/$subdir/$basename.exp" ] then {
+ source "$srcdir/$subdir/$basename.exp"
} else {
- if { $verbose } {
- set redirect_output "./$base.log"
- } else {
- set redirect_output /dev/null
- }
- ws_spawn "$rootme/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"
- }
- }
+ ws_spawn "$CC -nodefaultlibs -mwin32 $CFLAGS $src $add_includes $add_libs $runtime_root/binmode.o -lgcc $runtime_root/libcygwin0.a -lkernel32 -luser32 -o $base.exe"
+ if { $rv != "" } {
+ verbose -log "$rv"
+ fail "$testcase (compile)"
} else {
- pass "$testcase"
- if { ! $xfail_expected } {
- catch { file delete "$base.exe" } err
- if { $err != "" } {
- note "error deleting $base.exe: $err"
+ if { $verbose } {
+ set redirect_output "./$base.log"
+ } else {
+ set redirect_output /dev/null
+ }
+ ws_spawn "$rootme/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"
+ }
}
}
}