Skip to content

Commit

Permalink
Merge pull request #2105 from mjwoods/mingw-w64-pwd
Browse files Browse the repository at this point in the history
Use Windows paths in tests of mingw-w64 executables
  • Loading branch information
WardF authored Apr 11, 2022
2 parents 24835e0 + c0f319d commit 1cb28a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 4 additions & 0 deletions ncdump/testpathcvt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi

set -e

# Disable automatic path conversions in MINGW shell:
export MSYS2_ARG_CONV_EXCL='*'

# We need to find the drive letter, if any
DL=`${NCPATHCVT} -c -e / | sed -e 's|/cygdrive/\([a-zA-Z]\)/.*|\1|'`
if test "x$DL" != x ; then
Expand All @@ -13,6 +16,7 @@ if test "x$DL" != x ; then
DL="-d $DLL"
fi


testcase1() {
T="$1"
P="$2"
Expand Down
13 changes: 5 additions & 8 deletions test_common.in
Original file line number Diff line number Diff line change
Expand Up @@ -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,
# but executables compiled for Windows do not recognise the mount point.
# 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
MSYS2_PREFIX=`cygpath -w '/'`
export MSYS2_PREFIX
fi
fi
if test "x${FP_ISMINGW}" = xyes ; then
alias pwd='pwd -W'

system=`uname`
if test "x${system##MINGW*}" = x; then
alias pwd='pwd -W'

fi

# We assume that TOPSRCDIR and TOPBUILDDIR are defined
Expand Down

0 comments on commit 1cb28a9

Please sign in to comment.