4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-05 22:10:25 +08:00
Jon Turney daeeaa97b3
Cygwin: testsuite: Build testcases using automake
Build all the testcase executables directly using automake, rather than
passing the compiler information into DejaGnu to have it build them.

(This means you get build avoidance for these executables, so they only
get built once, rather than every time you run the test, and makes it
much easier to run them in isolatation against the installed Cygwin,
which is really nice to have when trying to fix broken tests...)

Rename the 'cygrun' subdirectory to 'mingw', and build all the testsuite
MinGW executables there.

Drop sample-miscompile.c (testing that compile failure is detected is
perhaps useful, but not here...)
2023-01-13 17:03:52 +00:00

31 lines
760 B
Plaintext

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"
}
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/cygwin1.dll > $redirect_output"
if { $rv != {0 {}} } {
verbose -log "cygload: $rv"
fail "cygload"
} else {
pass "cygload"
}