clearlogs
logmsg
runclient
+ exerunner
shell_quote
subbase64
subsha256base64file
return (-1, 0, 0, "", "", 0);
}
+ $CMDLINE=exerunner() . $CMDLINE;
+
if($bundle) {
$CMDLINE.=" $tool_name";
}
}
if(!$tool) {
- $CMDLINE=shell_quote($CURL);
+ $CMDLINE=exerunner() . shell_quote($CURL);
if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-q/)) {
$CMDLINE .= " -q";
}
my $curlverout="$LOGDIR/curlverout.log";
my $curlvererr="$LOGDIR/curlvererr.log";
- my $versioncmd=shell_quote($CURL) . " --version 1>$curlverout 2>$curlvererr";
+ my $versioncmd=exerunner() . shell_quote($CURL) . " --version 1>$curlverout 2>$curlvererr";
unlink($curlverout);
unlink($curlvererr);
# seed of the month. December 2019 becomes 201912
$randseed = ($year+1900)*100 + $mon+1;
print "Using curl: $CURL\n";
- open(my $curlvh, "-|", shell_quote($CURL) . " --version 2>$dev_null") ||
+ open(my $curlvh, "-|", exerunner() . shell_quote($CURL) . " --version 2>$dev_null") ||
die "could not get curl version!";
my @c = <$curlvh>;
close($curlvh) || die "could not get curl version!";
use pathhelp qw(
exe_ext
);
+use testutil qw(
+ exerunner
+ );
our $logfile; # server log file name, for logmsg
else {
$cmd = $SRVDIR . $name . exe_ext($ext);
}
- return "$cmd";
+ return exerunner() . "$cmd";
}
else {
@cmd = ($SRVDIR . $name . exe_ext($ext));
}
+ if($ENV{'CURL_TEST_EXE_RUNNER'}) {
+ unshift @cmd, $ENV{'CURL_TEST_EXE_RUNNER'};
+ }
return @cmd;
}
runclient
runclientoutput
setlogfunc
+ exerunner
shell_quote
subbase64
subnewlines
# return @out;
}
+#######################################################################
+# Return custom tool (e.g. wine or qemu) to run curl binaries.
+#
+sub exerunner {
+ if($ENV{'CURL_TEST_EXE_RUNNER'}) {
+ return $ENV{'CURL_TEST_EXE_RUNNER'} . ' ';
+ }
+ return '';
+}
#######################################################################
# Quote an argument for passing safely to a Bourne shell