Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-01-02 09:15:58 +0300
committerChristopher Faylor <me@cgf.cx>2006-01-02 09:15:58 +0300
commit7f9832e774a4b4a5bf7a7cbf31d22d11791fab48 (patch)
tree93716c3e0ca09beb4d1380339efb1c212a461645 /winsup/testsuite/winsup.api/cygload.exp
parentb0b9ccf6181f75f4c1363e3a8d65a0b9ebda63d5 (diff)
* 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/cygload.exp')
-rw-r--r--winsup/testsuite/winsup.api/cygload.exp40
1 files changed, 40 insertions, 0 deletions
diff --git a/winsup/testsuite/winsup.api/cygload.exp b/winsup/testsuite/winsup.api/cygload.exp
new file mode 100644
index 000000000..a07a549f9
--- /dev/null
+++ b/winsup/testsuite/winsup.api/cygload.exp
@@ -0,0 +1,40 @@
+source "site.exp"
+
+if { ! [isnative] } {
+ verbose "skipping cygload because it's not native \"$target_triplet\" != \"$build_triplet\""
+ return
+}
+
+proc ws_spawn {cmd args} {
+ global rv
+ verbose "running $cmd\n"
+ set rv {}
+ # First item in rv is the return code, second item is the message
+ lappend rv [catch "exec $cmd" message] $message
+ verbose send "catchCode = $rv\n"
+}
+
+ws_spawn "gcc -mno-cygwin $srcdir/$subdir/cygload.cc -o mingw-cygload.exe -lstdc++ -Wl,-e,_cygloadCRTStartup@0"
+
+if { $rv != {0 {}} } {
+ verbose -log "$rv"
+ fail "cygload (compile)"
+} else {
+ if { $verbose } {
+ set redirect_output "./mingw-cygwin.log"
+ } else {
+ set redirect_output /dev/null
+ }
+ set windows_runtime_root [exec cygpath -m $runtime_root]
+ ws_spawn "./mingw-cygload.exe -cygwin $windows_runtime_root/cygwin0.dll > $redirect_output"
+ if { $rv != {0 {}} } {
+ verbose -log "cygload: $rv"
+ fail "cygload (execute)"
+ } else {
+ pass "cygload"
+ }
+ catch { file delete "mingw-cygload.exe" } err
+ if { $err != "" } {
+ note "error deleting mingw-cygload.exe: $err"
+ }
+}