]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: get textaware info from curl instead of perl
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 18 Oct 2019 21:22:04 +0000 (23:22 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Sun, 20 Oct 2019 11:06:57 +0000 (13:06 +0200)
The MSYS system on Windows can run the test suite for curl built with
any toolset. When built with the MSYS GCC, curl uses Unix line endings,
while it uses Windows line endings when built with the MinGW GCC, and
`^O` reports 'msys' in both cases. Use the curl executable itself to
determine the line endings instead, which reports 'x86_64-pc-msys' when
built with the MSYS GCC.

Closes https://github.com/curl/curl/pull/4506

tests/runtests.pl

index 9413f0d4136e68f548f9ca4cbd8f9e4528b37730..63bd2da68d8205d286070962dc16fc37f6cf8d5d 100755 (executable)
@@ -2678,6 +2678,7 @@ sub checksystem {
                 # This is a Windows MinGW build or native build, we need to use
                 # Win32-style path.
                 $pwd = pathhelp::sys_native_current_path();
+                $has_textaware = 1;
             }
            if ($libcurl =~ /(winssl|schannel)/i) {
                $has_winssl=1;
@@ -3024,7 +3025,6 @@ sub checksystem {
             }
         }
     }
-    $has_textaware = ($^O eq 'MSWin32') || ($^O eq 'msys');
 
     logmsg "***************************************** \n";