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:
authorJon Turney <jon.turney@dronecode.org.uk>2022-12-23 16:05:34 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-01-10 13:27:13 +0300
commit1a9f95d8941d58385fb76ec20fac143c035cec85 (patch)
tree2cee6a6403eea421f1aa5dd89a055708d064e6a0 /winsup/testsuite/winsup.api
parent13a7b16ea3ad64794b1cd7651ecfef9c258f3a6c (diff)
Cygwin: Run testsuite against the just-built DLL
Since 4e7817498efc, we're just running the tests against the installed DLL. We're arranging to put the build directory on the path, but since it doesn't contain cygwin1.dll (since it's built with a different name and renamed on installation), that doesn't have any effect. Arrange to place the just-built DLL into a directory which the testsuite can place on it's path (while running the test, but not while compiling it). Also fix any remaining references to cygwin0.dll in testsuite, documentation and comments. Fixes: 4e7817498efc ("Cygwin: Makefile: Drop all the "test dll" considerations")
Diffstat (limited to 'winsup/testsuite/winsup.api')
-rw-r--r--winsup/testsuite/winsup.api/cygload.exp2
-rw-r--r--winsup/testsuite/winsup.api/winsup.exp8
2 files changed, 6 insertions, 4 deletions
diff --git a/winsup/testsuite/winsup.api/cygload.exp b/winsup/testsuite/winsup.api/cygload.exp
index 8ba8249bb..e378820ad 100644
--- a/winsup/testsuite/winsup.api/cygload.exp
+++ b/winsup/testsuite/winsup.api/cygload.exp
@@ -32,7 +32,7 @@ if { $rv != {0 {}} } {
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"
+ ws_spawn "./mingw-cygload.exe -cygwin $windows_runtime_root/cygwin1.dll > $redirect_output"
if { $rv != {0 {}} } {
verbose -log "cygload: $rv"
fail "cygload (execute)"
diff --git a/winsup/testsuite/winsup.api/winsup.exp b/winsup/testsuite/winsup.api/winsup.exp
index f755c82d9..e81ead304 100644
--- a/winsup/testsuite/winsup.api/winsup.exp
+++ b/winsup/testsuite/winsup.api/winsup.exp
@@ -14,9 +14,9 @@ set ltp_libs "$ltp_libs"
set add_includes $ltp_includes
set add_libs $ltp_libs
-set test_filter ""
+set orig_path "$env(PATH)"
-set env(PATH) "$runtime_root:$env(PATH)"
+set test_filter ""
if { [info exists env(CYGWIN_TESTSUITE_TESTS)] } {
set test_filter "$env(CYGWIN_TESTSUITE_TESTS)"
@@ -61,7 +61,7 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.{cc
if [ file exists "$srcdir/$subdir/$basename.exp" ] then {
source "$srcdir/$subdir/$basename.exp"
} else {
- ws_spawn "$CC -nodefaultlibs -mwin32 $CFLAGS $src $add_includes $add_libs $runtime_root/binmode.o -lgcc $runtime_root/libcygwin.a -lkernel32 -luser32 -o $base.exe"
+ ws_spawn "$CC -nodefaultlibs -mwin32 $CFLAGS $src $add_includes $add_libs $libdir/binmode.o -lgcc $libdir/libcygwin.a -lkernel32 -luser32 -o $base.exe"
if { $rv } {
fail "$testcase (compile)"
} else {
@@ -71,8 +71,10 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.{cc
set redirect_output /dev/null
}
file mkdir $tmpdir/$base
+ set env(PATH) "$runtime_root:$env(PATH)"
ws_spawn "$cygrun ./$base.exe $testdll_tmpdir/$base > $redirect_output"
file delete -force $tmpdir/$base
+ set env(PATH) "$orig_path"
if { $rv } {
fail "$testcase (execute)"
if { $xfail_expected } {