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

winsup.exp « winsup.api « testsuite « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 96e7c7cf4a2a782ada12f739a48c674957d6a951 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 > /dev/null"
        if { $rv != "" } {
	    verbose -log "$testcase: $rv"
	    fail "$testcase (execute)"
	} else {
	    pass "$testcase"
	    file delete "$base.exe"
	}
    }
}