Merge pull request #2105 from mjwoods/mingw-w64-pwd

Use Windows paths in tests of mingw-w64 executables
This commit is contained in:
Ward Fisher 2022-04-11 13:22:59 -06:00 committed by GitHub
commit 1cb28a9e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -5,6 +5,9 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi
set -e set -e
# Disable automatic path conversions in MINGW shell:
export MSYS2_ARG_CONV_EXCL='*'
# We need to find the drive letter, if any # We need to find the drive letter, if any
DL=`${NCPATHCVT} -c -e / | sed -e 's|/cygdrive/\([a-zA-Z]\)/.*|\1|'` DL=`${NCPATHCVT} -c -e / | sed -e 's|/cygdrive/\([a-zA-Z]\)/.*|\1|'`
if test "x$DL" != x ; then if test "x$DL" != x ; then
@ -13,6 +16,7 @@ if test "x$DL" != x ; then
DL="-d $DLL" DL="-d $DLL"
fi fi
testcase1() { testcase1() {
T="$1" T="$1"
P="$2" P="$2"

View File

@ -88,14 +88,11 @@ if test "x$SETX" = x1 ; then set -x ; fi
# On MINGW, bash and other POSIX utilities use a mounted root directory, # On MINGW, bash and other POSIX utilities use a mounted root directory,
# but executables compiled for Windows do not recognise the mount point. # but executables compiled for Windows do not recognise the mount point.
# Here we ensure that Windows paths are used in tests of Windows executables. # Here we ensure that Windows paths are used in tests of Windows executables.
if test "x${FP_ISMSYS}" = xyes || test "x${FP_ISCYGWIN}" = xyes ; then
if test "x${MSYS2_PREFIX}" = x ; then system=`uname`
MSYS2_PREFIX=`cygpath -w '/'` if test "x${system##MINGW*}" = x; then
export MSYS2_PREFIX alias pwd='pwd -W'
fi
fi
if test "x${FP_ISMINGW}" = xyes ; then
alias pwd='pwd -W'
fi fi
# We assume that TOPSRCDIR and TOPBUILDDIR are defined # We assume that TOPSRCDIR and TOPBUILDDIR are defined