diff options
author | Christopher Faylor <me@cgf.cx> | 2000-02-17 19:38:33 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-02-17 19:38:33 +0000 |
commit | 1fd5e000ace55b323124c7e556a7a864b972a5c4 (patch) | |
tree | dc4fcf1e5e22a040716ef92c496b8d94959b2baa /winsup/testsuite/winsup.api/winsup.exp | |
parent | 369d8a8fd5e887eca547bf34bccfdf755c9e5397 (diff) | |
download | cygnal-1fd5e000ace55b323124c7e556a7a864b972a5c4.tar.gz cygnal-1fd5e000ace55b323124c7e556a7a864b972a5c4.tar.bz2 cygnal-1fd5e000ace55b323124c7e556a7a864b972a5c4.zip |
import winsup-2000-02-17 snapshot
Diffstat (limited to 'winsup/testsuite/winsup.api/winsup.exp')
-rw-r--r-- | winsup/testsuite/winsup.api/winsup.exp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/winsup/testsuite/winsup.api/winsup.exp b/winsup/testsuite/winsup.api/winsup.exp new file mode 100644 index 000000000..5c85cc00b --- /dev/null +++ b/winsup/testsuite/winsup.api/winsup.exp @@ -0,0 +1,43 @@ +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" + if { $rv != "" } { + verbose -log "$testcase: $rv" + fail "$testcase (execute)" + } else { + pass "$testcase" + file delete "$base.exe" + } + } +} |