diff options
author | Marc Hoersken <info@marc-hoersken.de> | 2019-05-18 23:32:04 +0200 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2019-12-09 19:32:41 -0500 |
commit | 9819984fbb04968dcec53a65ae0dfae23111dd18 (patch) | |
tree | b66fdf74f8b3b7396e19f993df9125934209dee2 /tests/runtests.pl | |
parent | 213c5aca7bfc74a6ae02b065c5f38a1e9ff54d62 (diff) | |
download | curl-9819984fbb04968dcec53a65ae0dfae23111dd18.tar.gz |
tests: make it possible to set executable extensions
This enables the use of Windows Subsystem for Linux (WSL) to run the
testsuite against Windows binaries while using Linux servers.
This commit introduces the following environment variables:
- CURL_TEST_EXE_EXT: set the executable extension for all components
- CURL_TEST_EXE_EXT_TOOL: set it for the curl tool only
- CURL_TEST_EXE_EXT_SSH: set it for the SSH tools only
Later testcurl.pl could be adjusted to make use of those variables.
- CURL_TEST_EXE_EXT_SRV: set it for the test servers only
(This is one of several commits to support use of WSL for the tests.)
Closes https://github.com/curl/curl/pull/3899
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-x | tests/runtests.pl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index 737fbe27e..961cdb753 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -150,7 +150,7 @@ my $SMBSPORT; # SMBS server port my $NEGTELNETPORT; # TELNET server port with negotiation my $srcdir = $ENV{'srcdir'} || '.'; -my $CURL="../src/curl".exe_ext(); # what curl executable to run on the tests +my $CURL="../src/curl".exe_ext('TOOL'); # what curl executable to run on the tests my $VCURL=$CURL; # what curl binary to use to verify the servers with # VCURL is handy to set to the system one when the one you # just built hangs or crashes and thus prevent verification @@ -2915,7 +2915,8 @@ sub checksystem { # client has IPv6 support # check if the HTTP server has it! - my @sws = `server/sws --version`; + my $cmd = "server/sws".exe_ext('SRV')." --version"; + my @sws = `$cmd`; if($sws[0] =~ /IPv6/) { # HTTP server has IPv6 support! $http_ipv6 = 1; @@ -2923,7 +2924,8 @@ sub checksystem { } # check if the FTP server has it! - @sws = `server/sockfilt --version`; + $cmd = "server/sockfilt".exe_ext('SRV')." --version"; + @sws = `$cmd`; if($sws[0] =~ /IPv6/) { # FTP server has IPv6 support! $ftp_ipv6 = 1; @@ -2932,7 +2934,8 @@ sub checksystem { if($has_unix) { # client has Unix sockets support, check whether the HTTP server has it - my @sws = `server/sws --version`; + my $cmd = "server/sws".exe_ext('SRV')." --version"; + my @sws = `$cmd`; $http_unix = 1 if($sws[0] =~ /unix/); } @@ -3342,7 +3345,7 @@ sub singletest { } else { if($var =~ /^LD_PRELOAD/) { - if(exe_ext() && (exe_ext() eq '.exe')) { + if(exe_ext('TOOL') && (exe_ext('TOOL') eq '.exe')) { # print "Skipping LD_PRELOAD due to lack of OS support\n"; next; } @@ -3489,6 +3492,7 @@ sub singletest { if(@codepieces) { $tool = $codepieces[0]; chomp $tool; + $tool .= exe_ext('TOOL'); } # remove server output logfile |