From 3749328fbd142600dff69814ca660d78baa5f7c7 Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Sun, 5 Sep 2021 19:30:48 +1000 Subject: [PATCH] Use Windows format for pwd in test_common on mingw --- test_common.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test_common.in b/test_common.in index d3fa388166..cf95d3de8c 100644 --- a/test_common.in +++ b/test_common.in @@ -75,6 +75,14 @@ set -e # Allow global set -x mechanism for debugging. 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. +system=`uname` +if test "x${system##MINGW*}" = x; then + alias pwd='pwd -W' +fi + # We assume that TOPSRCDIR and TOPBUILDDIR are defined # At the top of this shell script top_srcdir="$TOPSRCDIR"