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
This commit is contained in:
Marc Hoersken 2019-05-18 23:32:04 +02:00 committed by Jay Satiro
parent 213c5aca7b
commit 9819984fbb
4 changed files with 36 additions and 17 deletions

View file

@ -34,6 +34,10 @@ use serverhelp qw(
server_logfilename
);
use sshhelp qw(
exe_ext
);
my $verbose = 0; # set to 1 for debugging
my $port = 8990; # just a default
my $unix_socket; # location to place a listening Unix socket
@ -133,7 +137,7 @@ if($ipvnum eq 'unix') {
$flags .= "--srcdir \"$srcdir\"";
if($verbose) {
print STDERR "RUN: server/sws $flags\n";
print STDERR "RUN: server/sws".exe_ext('SRV')." $flags\n";
}
exec("server/sws $flags");
exec("server/sws".exe_ext('SRV')." $flags");