From 2d4b7e2d2cfb39d46d91f89b3888de8a23e73816 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 5e36b301b1..6cfeed2d86 100644 --- a/test_common.in +++ b/test_common.in @@ -73,6 +73,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 ed4ba0ea6e6c4dd607f2ee2094886b15bca56ca5 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 6cfeed2d86..9d01d345ab 100644 --- a/test_common.in +++ b/test_common.in @@ -95,13 +95,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}" @@ -109,13 +109,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 fd0e4b2fc834138862b8a004b50dad69765e69d8 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 19fee201ef3b83780ef4ee3b8448fd8811400d4b 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 726fa19a87..b06e2027a3 100755 --- a/nczarr_test/test_nczarr.sh +++ b/nczarr_test/test_nczarr.sh @@ -138,12 +138,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 resetrc() { From c1bddecb2e8dad96b5b7d9e5cdcdf03e6dc381c9 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 --- ncdap_test/testpathcvt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ncdap_test/testpathcvt.sh b/ncdap_test/testpathcvt.sh index 9c1e2aedcb..e6f4d3bd53 100755 --- a/ncdap_test/testpathcvt.sh +++ b/ncdap_test/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 8665d7f866e67bd96a634bcc4968b9faba8c7d3c 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 811b6227a9..725b9ee447 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 c99bd420afaf19e3c346181f40258045e53c19c2 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 9d01d345ab..bcd10cf7d8 100644 --- a/test_common.in +++ b/test_common.in @@ -73,16 +73,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 459ad9bfb0588fc92cc41dac946d769837bec793 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 bcd10cf7d8..5e36b301b1 100644 --- a/test_common.in +++ b/test_common.in @@ -85,13 +85,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}" @@ -99,13 +99,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 06a7d5b55f8cb47b0f105a515940b71a0ee98e4d 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 f6d33f8acd2148321cc663586cf0ce4645255405 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 b06e2027a3..726fa19a87 100755 --- a/nczarr_test/test_nczarr.sh +++ b/nczarr_test/test_nczarr.sh @@ -138,12 +138,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 resetrc() { From 34773bfff25730930f20f1bf78a5d0e944a70a87 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 725b9ee447..811b6227a9 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 86b7fa36328b49c794193e2e897ab7fef5eb2f7c 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 5e36b301b1..2e09767ca0 100644 --- a/test_common.in +++ b/test_common.in @@ -73,6 +73,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"