tests: fix http servers to run with a dynamic log directory

Ref: #10818
This commit is contained in:
Dan Fandrich 2023-03-29 08:54:57 -07:00
parent c753418d8b
commit 8a298119f1
4 changed files with 37 additions and 4 deletions

View file

@ -29,8 +29,9 @@ use Cwd;
use Cwd 'abs_path';
use File::Basename;
my $pidfile = "log/nghttpx.pid";
my $logfile = "log/http2.log";
my $logdir = "log";
my $pidfile = "$logdir/nghttpx.pid";
my $logfile = "$logdir/http2.log";
my $nghttpx = "nghttpx";
my $listenport = 9015;
my $listenport2 = 9016;
@ -82,6 +83,12 @@ while(@ARGV) {
shift @ARGV;
}
}
elsif($ARGV[0] eq '--logdir') {
if($ARGV[1]) {
$logdir = $ARGV[1];
shift @ARGV;
}
}
elsif($ARGV[0] eq '--conf') {
if($ARGV[1]) {
$conf = $ARGV[1];