Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Windows paths in tests of mingw-w64 executables #2105

Merged
merged 13 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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