From 92be01077f6852d238ed8a82012f03fe191393f8 Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Fri, 3 Sep 2021 12:04:24 +1000 Subject: [PATCH 01/12] Use Windows paths in tests of mingw executables --- test_common.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test_common.in b/test_common.in index d3fa388166..ac30ba083f 100644 --- a/test_common.in +++ b/test_common.in @@ -75,6 +75,16 @@ 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 + PWDCMD='pwd -W' +else + PWDCMD='pwd' +fi + # We assume that TOPSRCDIR and TOPBUILDDIR are defined # At the top of this shell script top_srcdir="$TOPSRCDIR" From 64f8cd9c69addc59a72751e5efc3177056680fab Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Fri, 3 Sep 2021 12:31:03 +1000 Subject: [PATCH 02/12] Replace pwd by $PWDCMD in test_common.in --- test_common.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test_common.in b/test_common.in index ac30ba083f..0ed9faa420 100644 --- a/test_common.in +++ b/test_common.in @@ -97,13 +97,13 @@ top_builddir="$TOPBUILDDIR" if test "x$srcdir" = x ; then # we need to figure out our directory # pick off the last component as the relative name of this directory - srcdir=`pwd` + srcdir=`$PWDCMD` current=`basename $srcdir` srcdir="${top_srcdir}/$current" fi # We also assume we are executing in builddir -builddir=`pwd` +builddir=`$PWDCMD` # execdir is an alias for builddir execdir="${builddir}" @@ -111,13 +111,13 @@ execdir="${builddir}" # pick off the last component as the relative name of this directory thisdir=`basename $srcdir` -WD=`pwd` +WD=`$PWDCMD` # Absolutize paths of interest -cd $srcdir; srcdir=`pwd` ; cd $WD -cd $top_srcdir; top_srcdir=`pwd` ; cd $WD -cd $builddir; builddir=`pwd` ; cd $WD -cd $top_builddir; top_builddir=`pwd` ; cd $WD -cd $execdir; execdir=`pwd` ; cd $WD +cd $srcdir; srcdir=`$PWDCMD` ; cd $WD +cd $top_srcdir; top_srcdir=`$PWDCMD` ; cd $WD +cd $builddir; builddir=`$PWDCMD` ; cd $WD +cd $top_builddir; top_builddir=`$PWDCMD` ; cd $WD +cd $execdir; execdir=`$PWDCMD` ; cd $WD # If we have cygpath (which only exists under CYGWIN), # then try to normalize selected file paths. From 13008f48c5d6b4c956013928ccd25f84ec250311 Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Fri, 3 Sep 2021 12:38:21 +1000 Subject: [PATCH 03/12] Replace pwd by $PWDCMD in d4test_common.sh --- dap4_test/d4test_common.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dap4_test/d4test_common.sh b/dap4_test/d4test_common.sh index a682c48c4c..31c77b0b6e 100755 --- a/dap4_test/d4test_common.sh +++ b/dap4_test/d4test_common.sh @@ -16,15 +16,15 @@ done fi # Define input paths -WD=`pwd` -cd ${srcdir}/daptestfiles; DAPTESTFILES=`pwd` ; cd ${WD} -cd ${srcdir}/dmrtestfiles; DMRTESTFILES=`pwd` ; cd ${WD} -cd ${srcdir}/cdltestfiles; CDLTESTFILES=`pwd` ; cd ${WD} -cd ${srcdir}/baseline; BASELINE=`pwd` ; cd ${WD} -cd ${srcdir}/baselineraw; BASELINERAW=`pwd` ; cd ${WD} -cd ${srcdir}/baselineremote; BASELINEREM=`pwd` ; cd ${WD} -cd ${srcdir}/baselinehyrax; BASELINEH=`pwd` ; cd ${WD} -cd ${builddir}/baselinethredds; BASELINETH=`pwd` ; cd ${WD} +WD=`$PWDCMD` +cd ${srcdir}/daptestfiles; DAPTESTFILES=`$PWDCMD` ; cd ${WD} +cd ${srcdir}/dmrtestfiles; DMRTESTFILES=`$PWDCMD` ; cd ${WD} +cd ${srcdir}/cdltestfiles; CDLTESTFILES=`$PWDCMD` ; cd ${WD} +cd ${srcdir}/baseline; BASELINE=`$PWDCMD` ; cd ${WD} +cd ${srcdir}/baselineraw; BASELINERAW=`$PWDCMD` ; cd ${WD} +cd ${srcdir}/baselineremote; BASELINEREM=`$PWDCMD` ; cd ${WD} +cd ${srcdir}/baselinehyrax; BASELINEH=`$PWDCMD` ; cd ${WD} +cd ${builddir}/baselinethredds; BASELINETH=`$PWDCMD` ; cd ${WD} setresultdir() { rm -fr ${builddir}/$1 From 14505fbc6f5122c9c7fbc0396612d9cc5f4de13c Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Fri, 3 Sep 2021 12:40:30 +1000 Subject: [PATCH 04/12] Replace pwd by $PWDCMD in test_nczarr.sh --- nczarr_test/test_nczarr.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nczarr_test/test_nczarr.sh b/nczarr_test/test_nczarr.sh index 3f9d6753c8..f60d4ec7d7 100755 --- a/nczarr_test/test_nczarr.sh +++ b/nczarr_test/test_nczarr.sh @@ -112,12 +112,12 @@ sclean() { } # Make sure execdir and srcdir absolute paths are available -WD=`pwd` -cd $srcdir ; abs_srcdir=`pwd` ; cd $WD -cd $execdir ; abs_execdir=`pwd` ; cd $WD +WD=`$PWDCMD` +cd $srcdir ; abs_srcdir=`$PWDCMD` ; cd $WD +cd $execdir ; abs_execdir=`$PWDCMD` ; cd $WD # Clear out any existing .rc files -WD=`pwd` +WD=`$PWDCMD` if test "x$NCAUTH_HOMETEST" != x ; then RCHOME=1; fi # Set plugin path From 02c92a5c4ff447c95944eb39ec999b4a26ff0172 Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Fri, 3 Sep 2021 12:58:33 +1000 Subject: [PATCH 05/12] Disable bash path conversions in testpathcvt.sh on mingw --- ncdump/testpathcvt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ncdump/testpathcvt.sh b/ncdump/testpathcvt.sh index 88f952c5e5..3a43c2e7eb 100755 --- a/ncdump/testpathcvt.sh +++ b/ncdump/testpathcvt.sh @@ -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='*' + testcase1() { T="$1" P="$2" From 9ec281a55a11cf85fb5fde2859283d39a3635009 Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Fri, 3 Sep 2021 13:57:48 +1000 Subject: [PATCH 06/12] Replace pwd by $PWDCMD after test_common.sh is sourced --- nc_test/run_diskless2.sh | 2 +- ncdap_test/testauth.sh | 8 ++++---- ncdap_test/testbasicauth.sh | 2 +- ncdap_test/testcontainerauth.sh | 2 +- ncdump/test_rcmerge.sh | 8 ++++---- nczarr_test/run_misc.sh | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nc_test/run_diskless2.sh b/nc_test/run_diskless2.sh index 4c75aae489..e286a5fa80 100755 --- a/nc_test/run_diskless2.sh +++ b/nc_test/run_diskless2.sh @@ -5,7 +5,7 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi set -e -if test "x$srcdir" = x ; then srcdir=`pwd`; fi +if test "x$srcdir" = x ; then srcdir=`$PWDCMD`; fi . ../test_common.sh # Get the target OS and CPU diff --git a/ncdap_test/testauth.sh b/ncdap_test/testauth.sh index 3743b225c0..7e275fc497 100755 --- a/ncdap_test/testauth.sh +++ b/ncdap_test/testauth.sh @@ -7,16 +7,16 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi # we need to isolate from any other test. # Make sure execdir and srcdir absolute paths are available -WD=`pwd` -cd $srcdir ; abs_srcdir=`pwd` ; cd $WD -cd $execdir ; abs_execdir=`pwd` ; cd $WD +WD=`$PWDCMD` +cd $srcdir ; abs_srcdir=`$PWDCMD` ; cd $WD +cd $execdir ; abs_execdir=`$PWDCMD` ; cd $WD # Now create a special directory # And enter it to execute tests rm -fr rcauthdir mkdir rcauthdir cd rcauthdir -WD=`pwd` +WD=`$PWDCMD` #SHOW=1 #DBG=1 diff --git a/ncdap_test/testbasicauth.sh b/ncdap_test/testbasicauth.sh index 536a22761d..2004e469a0 100644 --- a/ncdap_test/testbasicauth.sh +++ b/ncdap_test/testbasicauth.sh @@ -21,7 +21,7 @@ RCPREC=1 NFL=1 -WD=`pwd` +WD=`$PWDCMD` NETRCFILE=$WD/test_auth_netrc # This is the control variable; set when needed diff --git a/ncdap_test/testcontainerauth.sh b/ncdap_test/testcontainerauth.sh index 82f26e69c7..2b3c8e7f8c 100644 --- a/ncdap_test/testcontainerauth.sh +++ b/ncdap_test/testcontainerauth.sh @@ -9,7 +9,7 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi #GDB=1 #VG=1 -WD=`pwd` +WD=`$PWDCMD` COOKIES="${WD}/test_auth_cookies" RC=.daprc diff --git a/ncdump/test_rcmerge.sh b/ncdump/test_rcmerge.sh index 3f97bb0b4a..642c169d46 100755 --- a/ncdump/test_rcmerge.sh +++ b/ncdump/test_rcmerge.sh @@ -20,16 +20,16 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi # we need to isolate from any other test. # Make sure execdir and srcdir absolute paths are available -WD=`pwd` -cd $srcdir ; abs_srcdir=`pwd` ; cd $WD -cd $execdir ; abs_execdir=`pwd` ; cd $WD +WD=`$PWDCMD` +cd $srcdir ; abs_srcdir=`$PWDCMD` ; cd $WD +cd $execdir ; abs_execdir=`$PWDCMD` ; cd $WD # Now create a special directory # And enter it to execute tests rm -fr rcmergedir mkdir rcmergedir cd rcmergedir -WD=`pwd` +WD=`$PWDCMD` if test "x$NCAUTH_HOMETEST" != x ; then RCHOME=1 diff --git a/nczarr_test/run_misc.sh b/nczarr_test/run_misc.sh index 1ffb122bfb..99a8a97a11 100755 --- a/nczarr_test/run_misc.sh +++ b/nczarr_test/run_misc.sh @@ -11,7 +11,7 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi rm -fr rcmiscdir mkdir rcmiscdir cd rcmiscdir -WD=`pwd` +WD=`$PWDCMD` # This shell script provides a miscellaneous set of tests From 84af35e7d2bcb143b21f5ee2e6481fab64563c51 Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Sun, 5 Sep 2021 19:36:58 +1000 Subject: [PATCH 07/12] Revert "Use Windows paths in tests of mingw executables" This reverts commit 2d4b7e2d2cfb39d46d91f89b3888de8a23e73816. --- test_common.in | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/test_common.in b/test_common.in index 0ed9faa420..65184d1285 100644 --- a/test_common.in +++ b/test_common.in @@ -75,16 +75,6 @@ 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 - PWDCMD='pwd -W' -else - PWDCMD='pwd' -fi - # We assume that TOPSRCDIR and TOPBUILDDIR are defined # At the top of this shell script top_srcdir="$TOPSRCDIR" From 2fcbf1e439ee96a6a3e67ac0068ec49a931829c8 Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Sun, 5 Sep 2021 19:37:02 +1000 Subject: [PATCH 08/12] Revert "Replace pwd by $PWDCMD in test_common.in" This reverts commit ed4ba0ea6e6c4dd607f2ee2094886b15bca56ca5. --- test_common.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test_common.in b/test_common.in index 65184d1285..d3fa388166 100644 --- a/test_common.in +++ b/test_common.in @@ -87,13 +87,13 @@ top_builddir="$TOPBUILDDIR" if test "x$srcdir" = x ; then # we need to figure out our directory # pick off the last component as the relative name of this directory - srcdir=`$PWDCMD` + srcdir=`pwd` current=`basename $srcdir` srcdir="${top_srcdir}/$current" fi # We also assume we are executing in builddir -builddir=`$PWDCMD` +builddir=`pwd` # execdir is an alias for builddir execdir="${builddir}" @@ -101,13 +101,13 @@ execdir="${builddir}" # pick off the last component as the relative name of this directory thisdir=`basename $srcdir` -WD=`$PWDCMD` +WD=`pwd` # Absolutize paths of interest -cd $srcdir; srcdir=`$PWDCMD` ; cd $WD -cd $top_srcdir; top_srcdir=`$PWDCMD` ; cd $WD -cd $builddir; builddir=`$PWDCMD` ; cd $WD -cd $top_builddir; top_builddir=`$PWDCMD` ; cd $WD -cd $execdir; execdir=`$PWDCMD` ; cd $WD +cd $srcdir; srcdir=`pwd` ; cd $WD +cd $top_srcdir; top_srcdir=`pwd` ; cd $WD +cd $builddir; builddir=`pwd` ; cd $WD +cd $top_builddir; top_builddir=`pwd` ; cd $WD +cd $execdir; execdir=`pwd` ; cd $WD # If we have cygpath (which only exists under CYGWIN), # then try to normalize selected file paths. From d4c55aac4e6d6cb3b8a0e2cd1ed547b554986fbb Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Sun, 5 Sep 2021 19:37:04 +1000 Subject: [PATCH 09/12] Revert "Replace pwd by $PWDCMD in d4test_common.sh" This reverts commit fd0e4b2fc834138862b8a004b50dad69765e69d8. --- dap4_test/d4test_common.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dap4_test/d4test_common.sh b/dap4_test/d4test_common.sh index 31c77b0b6e..a682c48c4c 100755 --- a/dap4_test/d4test_common.sh +++ b/dap4_test/d4test_common.sh @@ -16,15 +16,15 @@ done fi # Define input paths -WD=`$PWDCMD` -cd ${srcdir}/daptestfiles; DAPTESTFILES=`$PWDCMD` ; cd ${WD} -cd ${srcdir}/dmrtestfiles; DMRTESTFILES=`$PWDCMD` ; cd ${WD} -cd ${srcdir}/cdltestfiles; CDLTESTFILES=`$PWDCMD` ; cd ${WD} -cd ${srcdir}/baseline; BASELINE=`$PWDCMD` ; cd ${WD} -cd ${srcdir}/baselineraw; BASELINERAW=`$PWDCMD` ; cd ${WD} -cd ${srcdir}/baselineremote; BASELINEREM=`$PWDCMD` ; cd ${WD} -cd ${srcdir}/baselinehyrax; BASELINEH=`$PWDCMD` ; cd ${WD} -cd ${builddir}/baselinethredds; BASELINETH=`$PWDCMD` ; cd ${WD} +WD=`pwd` +cd ${srcdir}/daptestfiles; DAPTESTFILES=`pwd` ; cd ${WD} +cd ${srcdir}/dmrtestfiles; DMRTESTFILES=`pwd` ; cd ${WD} +cd ${srcdir}/cdltestfiles; CDLTESTFILES=`pwd` ; cd ${WD} +cd ${srcdir}/baseline; BASELINE=`pwd` ; cd ${WD} +cd ${srcdir}/baselineraw; BASELINERAW=`pwd` ; cd ${WD} +cd ${srcdir}/baselineremote; BASELINEREM=`pwd` ; cd ${WD} +cd ${srcdir}/baselinehyrax; BASELINEH=`pwd` ; cd ${WD} +cd ${builddir}/baselinethredds; BASELINETH=`pwd` ; cd ${WD} setresultdir() { rm -fr ${builddir}/$1 From a87c57f38f53df8142ca7d50fe1e16fb8109932c Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Sun, 5 Sep 2021 19:37:06 +1000 Subject: [PATCH 10/12] Revert "Replace pwd by $PWDCMD in test_nczarr.sh" This reverts commit 19fee201ef3b83780ef4ee3b8448fd8811400d4b. --- nczarr_test/test_nczarr.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nczarr_test/test_nczarr.sh b/nczarr_test/test_nczarr.sh index f60d4ec7d7..3f9d6753c8 100755 --- a/nczarr_test/test_nczarr.sh +++ b/nczarr_test/test_nczarr.sh @@ -112,12 +112,12 @@ sclean() { } # Make sure execdir and srcdir absolute paths are available -WD=`$PWDCMD` -cd $srcdir ; abs_srcdir=`$PWDCMD` ; cd $WD -cd $execdir ; abs_execdir=`$PWDCMD` ; cd $WD +WD=`pwd` +cd $srcdir ; abs_srcdir=`pwd` ; cd $WD +cd $execdir ; abs_execdir=`pwd` ; cd $WD # Clear out any existing .rc files -WD=`$PWDCMD` +WD=`pwd` if test "x$NCAUTH_HOMETEST" != x ; then RCHOME=1; fi # Set plugin path From 2da66c641e296157fd4786a0ea2eef9eda58eb7c Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Sun, 5 Sep 2021 19:37:08 +1000 Subject: [PATCH 11/12] Revert "Replace pwd by $PWDCMD after test_common.sh is sourced" This reverts commit 8665d7f866e67bd96a634bcc4968b9faba8c7d3c. --- nc_test/run_diskless2.sh | 2 +- ncdap_test/testauth.sh | 8 ++++---- ncdap_test/testbasicauth.sh | 2 +- ncdap_test/testcontainerauth.sh | 2 +- ncdump/test_rcmerge.sh | 8 ++++---- nczarr_test/run_misc.sh | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nc_test/run_diskless2.sh b/nc_test/run_diskless2.sh index e286a5fa80..4c75aae489 100755 --- a/nc_test/run_diskless2.sh +++ b/nc_test/run_diskless2.sh @@ -5,7 +5,7 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi set -e -if test "x$srcdir" = x ; then srcdir=`$PWDCMD`; fi +if test "x$srcdir" = x ; then srcdir=`pwd`; fi . ../test_common.sh # Get the target OS and CPU diff --git a/ncdap_test/testauth.sh b/ncdap_test/testauth.sh index 7e275fc497..3743b225c0 100755 --- a/ncdap_test/testauth.sh +++ b/ncdap_test/testauth.sh @@ -7,16 +7,16 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi # we need to isolate from any other test. # Make sure execdir and srcdir absolute paths are available -WD=`$PWDCMD` -cd $srcdir ; abs_srcdir=`$PWDCMD` ; cd $WD -cd $execdir ; abs_execdir=`$PWDCMD` ; cd $WD +WD=`pwd` +cd $srcdir ; abs_srcdir=`pwd` ; cd $WD +cd $execdir ; abs_execdir=`pwd` ; cd $WD # Now create a special directory # And enter it to execute tests rm -fr rcauthdir mkdir rcauthdir cd rcauthdir -WD=`$PWDCMD` +WD=`pwd` #SHOW=1 #DBG=1 diff --git a/ncdap_test/testbasicauth.sh b/ncdap_test/testbasicauth.sh index 2004e469a0..536a22761d 100644 --- a/ncdap_test/testbasicauth.sh +++ b/ncdap_test/testbasicauth.sh @@ -21,7 +21,7 @@ RCPREC=1 NFL=1 -WD=`$PWDCMD` +WD=`pwd` NETRCFILE=$WD/test_auth_netrc # This is the control variable; set when needed diff --git a/ncdap_test/testcontainerauth.sh b/ncdap_test/testcontainerauth.sh index 2b3c8e7f8c..82f26e69c7 100644 --- a/ncdap_test/testcontainerauth.sh +++ b/ncdap_test/testcontainerauth.sh @@ -9,7 +9,7 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi #GDB=1 #VG=1 -WD=`$PWDCMD` +WD=`pwd` COOKIES="${WD}/test_auth_cookies" RC=.daprc diff --git a/ncdump/test_rcmerge.sh b/ncdump/test_rcmerge.sh index 642c169d46..3f97bb0b4a 100755 --- a/ncdump/test_rcmerge.sh +++ b/ncdump/test_rcmerge.sh @@ -20,16 +20,16 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi # we need to isolate from any other test. # Make sure execdir and srcdir absolute paths are available -WD=`$PWDCMD` -cd $srcdir ; abs_srcdir=`$PWDCMD` ; cd $WD -cd $execdir ; abs_execdir=`$PWDCMD` ; cd $WD +WD=`pwd` +cd $srcdir ; abs_srcdir=`pwd` ; cd $WD +cd $execdir ; abs_execdir=`pwd` ; cd $WD # Now create a special directory # And enter it to execute tests rm -fr rcmergedir mkdir rcmergedir cd rcmergedir -WD=`$PWDCMD` +WD=`pwd` if test "x$NCAUTH_HOMETEST" != x ; then RCHOME=1 diff --git a/nczarr_test/run_misc.sh b/nczarr_test/run_misc.sh index 99a8a97a11..1ffb122bfb 100755 --- a/nczarr_test/run_misc.sh +++ b/nczarr_test/run_misc.sh @@ -11,7 +11,7 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi rm -fr rcmiscdir mkdir rcmiscdir cd rcmiscdir -WD=`$PWDCMD` +WD=`pwd` # This shell script provides a miscellaneous set of tests From 3749328fbd142600dff69814ca660d78baa5f7c7 Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Sun, 5 Sep 2021 19:30:48 +1000 Subject: [PATCH 12/12] 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"