public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: Fix testsuite tmpdir creation with non-default cygdrive prefix
Date: Thu, 12 Nov 2020 15:31:50 +0000 (GMT)	[thread overview]
Message-ID: <20201112153150.41934386F02A@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=140b0a6484414fcf848012c848c674644cc64f11

commit 140b0a6484414fcf848012c848c674644cc64f11
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Nov 9 13:48:38 2020 +0000

    Cygwin: Fix testsuite tmpdir creation with non-default cygdrive prefix

Diff:
---
 winsup/testsuite/Makefile.in           | 10 ++++++----
 winsup/testsuite/winsup.api/winsup.exp |  2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/winsup/testsuite/Makefile.in b/winsup/testsuite/Makefile.in
index 3b5a251b2..4948a0bc7 100644
--- a/winsup/testsuite/Makefile.in
+++ b/winsup/testsuite/Makefile.in
@@ -124,10 +124,11 @@ $(RUNTIME) : $(cygwin_build)/Makefile
 # Set to $(target_alias)/ for cross.
 target_subdir = @target_subdir@
 
-# temporary directory to be used for files created by tests (as an absolute,
-# /cygdrive path, so it can be understood by the test DLL, which will have
-# different mount table)
-tmpdir = $(shell cygpath -ma $(objdir)/testsuite/tmp/ | sed -e 's#^\([A-Z]\):#/cygdrive/\L\1#')
+# a temporary directory, to be used for files created by tests
+tmpdir = $(abspath $(objdir)/testsuite/tmp/)
+# the same temporary directory, as an absolute, /cygdrive path (so it can be
+# understood by the test DLL, which will have a different mount table)
+testdll_tmpdir = $(shell cygpath -ma $(tmpdir) | sed -e 's#^\([A-Z]\):#/cygdrive/\L\1#')
 
 site.exp: ./config.status Makefile
 	@echo "Making a new config file..."
@@ -149,6 +150,7 @@ site.exp: ./config.status Makefile
 	@echo "set CFLAGS \"$(ALL_CFLAGS)\"" >> ./tmp0
 	@echo "set MINGW_CXX \"$(MINGW_CXX)\"" >> ./tmp0
 	@echo "set tmpdir $(tmpdir)" >> ./tmp0
+	@echo "set testdll_tmpdir $(testdll_tmpdir)" >> ./tmp0
 	@echo "set ltp_includes \"$(realpath $(libltp_srcdir))/include\"" >> ./tmp0
 	@echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
 	@cat ./tmp0 > site.exp
diff --git a/winsup/testsuite/winsup.api/winsup.exp b/winsup/testsuite/winsup.api/winsup.exp
index cd5964d47..4978136a1 100644
--- a/winsup/testsuite/winsup.api/winsup.exp
+++ b/winsup/testsuite/winsup.api/winsup.exp
@@ -69,7 +69,7 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.{cc
 	       set redirect_output /dev/null
 	    }
 	    file mkdir $tmpdir/$base
-	    ws_spawn "$rootme/cygrun ./$base.exe $tmpdir/$base > $redirect_output"
+	    ws_spawn "$rootme/cygrun ./$base.exe $testdll_tmpdir/$base > $redirect_output"
 	    file delete -force $tmpdir/$base
 	    if { $rv } {
 		fail "$testcase (execute)"


                 reply	other threads:[~2020-11-12 15:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201112153150.41934386F02A@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).