aboutsummaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
authorGuenter Knauf <lists@gknw.net>2012-07-20 15:30:41 +0200
committerGuenter Knauf <lists@gknw.net>2012-07-20 15:30:41 +0200
commite1711b0e9a762b1a7bf500896c9a972562cc30aa (patch)
tree5ceb62c9d419db6bb9d0ba2a53151943ebfb8ea8 /tests/runtests.pl
parentc27cc4cfe08f61a5a47503c037579cd13fd8b32e (diff)
Fixed MSYS <-> Windows path convertion.
Replaced the Windows real path from mount hack with a more reliable and simpler hack: the MSYS shell has a builtin pwd which understands a -W option which does convertion to Windows paths. Tested and confirmed that this works on all MSYS versions I have back to a 3 year old one.
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl42
1 files changed, 4 insertions, 38 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 902033448..461efe420 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -2204,44 +2204,10 @@ sub checksystem {
$libcurl = $2;
if($curl =~ /mingw32/) {
# This is a windows minw32 build, we need to translate the
- # given path to the "actual" windows path.
-
- my @m = `mount`;
- my $matchlen = 0;
- my $bestmatch;
- my $mount;
-
-# example mount output:
-# C:\DOCUME~1\Temp on /tmp type user (binmode,noumount)
-# c:\ActiveState\perl on /perl type user (binmode)
-# C:\msys\1.0\bin on /usr/bin type user (binmode,cygexec,noumount)
-# C:\msys\1.0\bin on /bin type user (binmode,cygexec,noumount)
-
- foreach $mount (@m) {
- if( $mount =~ /(.*) on ([^ ]*) type /) {
- my ($mingw, $real)=($2, $1);
- if($pwd =~ /^$mingw/) {
- # the path we got from pwd starts with the path
- # we found on this line in the mount output
-
- my $len = length($real);
- if($len > $matchlen) {
- # we remember the match that is the longest
- $matchlen = $len;
- $bestmatch = $real;
- }
- }
- }
- }
- if(!$matchlen) {
- logmsg "Serious error, can't find our \"real\" path\n";
- }
- else {
- # now prepend the prefix from the mount command to build
- # our "actual path"
- $pwd = "$bestmatch$pwd";
- }
- $pwd =~ s#\\#/#g;
+ # given path to the "actual" windows path. The MSYS shell
+ # has a builtin 'pwd -W' command which converts the path.
+ $pwd = `sh -c "echo \$(pwd -W)"`;
+ chomp($pwd);
}
elsif ($curl =~ /win32/) {
# Native Windows builds don't understand the