tests: fix remaining servers to run with a dynamic log directory
This final commit in the series is sufficient to allow the tests succeed if $LOGDIR is changed in runtests.pl. Ref: #10818 Closes #10866
This commit is contained in:
Родитель
0bdb95ecbf
Коммит
58e85d6d1d
|
@ -73,6 +73,12 @@ while(@ARGV) {
|
|||
shift @ARGV;
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq '--logdir') {
|
||||
if($ARGV[1]) {
|
||||
$logdir = $ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq '--srcdir') {
|
||||
if($ARGV[1]) {
|
||||
$srcdir = $ARGV[1];
|
||||
|
@ -118,7 +124,8 @@ if(!$logfile) {
|
|||
|
||||
$flags .= "--pidfile \"$pidfile\" ".
|
||||
"--portfile \"$portfile\" ".
|
||||
"--logfile \"$logfile\" ";
|
||||
"--logfile \"$logfile\" ".
|
||||
"--logdir \"$logdir\" ";
|
||||
$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
|
||||
|
||||
$| = 1;
|
||||
|
|
|
@ -1735,6 +1735,7 @@ sub runhttpsserver {
|
|||
|
||||
$flags .= "--verbose " if($debugprotocol);
|
||||
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
|
||||
$flags .= "--logdir \"$LOGDIR\" ";
|
||||
$flags .= "--id $idnum " if($idnum > 1);
|
||||
$flags .= "--ipv$ipvnum --proto $proto ";
|
||||
$flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
|
||||
|
@ -1979,6 +1980,7 @@ sub runsecureserver {
|
|||
|
||||
$flags .= "--verbose " if($debugprotocol);
|
||||
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
|
||||
$flags .= "--logdir \"$LOGDIR\" ";
|
||||
$flags .= "--id $idnum " if($idnum > 1);
|
||||
$flags .= "--ipv$ipvnum --proto $proto ";
|
||||
$flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
|
||||
|
@ -2063,7 +2065,8 @@ sub runtftpserver {
|
|||
$flags .= "--verbose " if($debugprotocol);
|
||||
$flags .= "--pidfile \"$pidfile\" ".
|
||||
"--portfile \"$portfile\" ".
|
||||
"--logfile \"$logfile\" ";
|
||||
"--logfile \"$logfile\" ".
|
||||
"--logdir \"$LOGDIR\" ";
|
||||
$flags .= "--id $idnum " if($idnum > 1);
|
||||
$flags .= "--ipv$ipvnum --port 0 --srcdir \"$srcdir\"";
|
||||
|
||||
|
@ -2145,7 +2148,8 @@ sub runrtspserver {
|
|||
$flags .= "--verbose " if($debugprotocol);
|
||||
$flags .= "--pidfile \"$pidfile\" ".
|
||||
"--portfile \"$portfile\" ".
|
||||
"--logfile \"$logfile\" ";
|
||||
"--logfile \"$logfile\" ".
|
||||
"--logdir \"$LOGDIR\" ";
|
||||
$flags .= "--id $idnum " if($idnum > 1);
|
||||
$flags .= "--ipv$ipvnum --port 0 --srcdir \"$srcdir\"";
|
||||
|
||||
|
@ -2231,6 +2235,7 @@ sub runsshserver {
|
|||
$flags .= "--verbose " if($verb);
|
||||
$flags .= "--debugprotocol " if($debugprotocol);
|
||||
$flags .= "--pidfile \"$pidfile\" ";
|
||||
$flags .= "--logdir \"$LOGDIR\" ";
|
||||
$flags .= "--id $idnum " if($idnum > 1);
|
||||
$flags .= "--ipv$ipvnum --addr \"$ip\" ";
|
||||
$flags .= "--user \"$USER\"";
|
||||
|
@ -2368,7 +2373,9 @@ sub runmqttserver {
|
|||
" --port 0 ".
|
||||
" --pidfile $pidfile".
|
||||
" --portfile $portfile".
|
||||
" --config $FTPDCMD";
|
||||
" --config $FTPDCMD".
|
||||
" --logfile $logfile".
|
||||
" --logdir $LOGDIR";
|
||||
my ($sockspid, $pid2) = startnew($cmd, $pidfile, 30, 0);
|
||||
|
||||
if($sockspid <= 0 || !pidexists($sockspid)) {
|
||||
|
@ -2429,6 +2436,8 @@ sub runsocksserver {
|
|||
if($is_unix) {
|
||||
$cmd="server/socksd".exe_ext('SRV').
|
||||
" --pidfile $pidfile".
|
||||
" --reqfile $SOCKSIN".
|
||||
" --logfile $logfile".
|
||||
" --unix-socket $SOCKSUNIXPATH".
|
||||
" --backend $HOSTIP".
|
||||
" --config $FTPDCMD";
|
||||
|
@ -2437,6 +2446,8 @@ sub runsocksserver {
|
|||
" --port 0 ".
|
||||
" --pidfile $pidfile".
|
||||
" --portfile $portfile".
|
||||
" --reqfile $SOCKSIN".
|
||||
" --logfile $logfile".
|
||||
" --backend $HOSTIP".
|
||||
" --config $FTPDCMD";
|
||||
}
|
||||
|
|
|
@ -167,6 +167,12 @@ while(@ARGV) {
|
|||
shift @ARGV;
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq '--logdir') {
|
||||
if($ARGV[1]) {
|
||||
$logdir = "$path/". $ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
}
|
||||
else {
|
||||
print STDERR "\nWarning: secureserver.pl unknown parameter: $ARGV[0]\n";
|
||||
}
|
||||
|
@ -183,7 +189,7 @@ if(!$logfile) {
|
|||
$logfile = server_logfilename($logdir, $proto, $ipvnum, $idnum);
|
||||
}
|
||||
|
||||
$conffile = "$path/${proto}_stunnel.conf";
|
||||
$conffile = "$logdir/${proto}_stunnel.conf";
|
||||
|
||||
$capath = abs_path($path);
|
||||
$certfile = "$srcdir/". ($stuncert?"certs/$stuncert":"stunnel.pem");
|
||||
|
|
|
@ -157,6 +157,12 @@ while(@ARGV) {
|
|||
shift @ARGV;
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq '--logdir') {
|
||||
if($ARGV[1]) {
|
||||
$logdir = "$path/". $ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq '--sshport') {
|
||||
if($ARGV[1]) {
|
||||
if($ARGV[1] =~ /^(\d+)$/) {
|
||||
|
|
|
@ -74,6 +74,12 @@ while(@ARGV) {
|
|||
shift @ARGV;
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq '--logdir') {
|
||||
if($ARGV[1]) {
|
||||
$logdir = $ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq '--srcdir') {
|
||||
if($ARGV[1]) {
|
||||
$srcdir = $ARGV[1];
|
||||
|
@ -119,7 +125,8 @@ if(!$logfile) {
|
|||
|
||||
$flags .= "--pidfile \"$pidfile\" ".
|
||||
"--portfile \"$portfile\" ".
|
||||
"--logfile \"$logfile\" ";
|
||||
"--logfile \"$logfile\" ".
|
||||
"--logdir \"$logdir\" ";
|
||||
$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
|
||||
|
||||
$| = 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче