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>2020-10-29 17:43:32 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2020-11-08 17:42:02 +0300
commitf3ed5f2fe029d74372aca68b18936e164ff47cf7 (patch)
tree47c836fbf93405df8fe06c439a4dcfcce027cf46 /winsup/testsuite/winsup.api
parent9cdb799806e7531a1286d5928e501ae84e74be5f (diff)
Cygwin: Ensure temporary directory used by tests exists
By default, libltp tests will create temporary files in a subdirectory of /tmp, which will (nowadays) be located relative to the test DLL (by assuming that it is in /bin). This will evaluate to the directory $target_builddir/winsup/tmp, which doesn't exist. The location used for these temporary files can be explicitly controlled by setting the TDIRECTORY env var. Arrange to set that env var to the /cygdrive path of a tmp subdirectory of the build directory. Unfortunately, libltp doesn't clean the temporary directory if TDIRECTORY is set, and some tests assume they are started in a clean directory, so we need to do that in tcl.
Diffstat (limited to 'winsup/testsuite/winsup.api')
-rw-r--r--winsup/testsuite/winsup.api/winsup.exp4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/testsuite/winsup.api/winsup.exp b/winsup/testsuite/winsup.api/winsup.exp
index 1550b9445..cd5964d47 100644
--- a/winsup/testsuite/winsup.api/winsup.exp
+++ b/winsup/testsuite/winsup.api/winsup.exp
@@ -68,7 +68,9 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.{cc
} else {
set redirect_output /dev/null
}
- ws_spawn "$rootme/cygrun ./$base.exe > $redirect_output"
+ file mkdir $tmpdir/$base
+ ws_spawn "$rootme/cygrun ./$base.exe $tmpdir/$base > $redirect_output"
+ file delete -force $tmpdir/$base
if { $rv } {
fail "$testcase (execute)"
if { $xfail_expected } {