mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
tests: enable HTTP/2 tests to run with non-default port numbers
This commit is contained in:
parent
727917555d
commit
41388b9ba3
@ -28,6 +28,7 @@ my $pidfile = "log/nghttpx.pid";
|
|||||||
my $logfile = "log/http2.log";
|
my $logfile = "log/http2.log";
|
||||||
my $nghttpx = "nghttpx";
|
my $nghttpx = "nghttpx";
|
||||||
my $listenport = 9015;
|
my $listenport = 9015;
|
||||||
|
my $connect = "127.0.0.1,8990";
|
||||||
|
|
||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
# Process command line options
|
# Process command line options
|
||||||
@ -54,6 +55,13 @@ while(@ARGV) {
|
|||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elsif($ARGV[0] eq '--connect') {
|
||||||
|
if($ARGV[1]) {
|
||||||
|
$connect = $ARGV[1];
|
||||||
|
$connect =~ s/:/,/;
|
||||||
|
shift @ARGV;
|
||||||
|
}
|
||||||
|
}
|
||||||
elsif($ARGV[0] eq '--logfile') {
|
elsif($ARGV[0] eq '--logfile') {
|
||||||
if($ARGV[1]) {
|
if($ARGV[1]) {
|
||||||
$logfile = $ARGV[1];
|
$logfile = $ARGV[1];
|
||||||
@ -66,7 +74,7 @@ while(@ARGV) {
|
|||||||
shift @ARGV;
|
shift @ARGV;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $cmdline="$nghttpx --backend=127.0.0.1,8990 ".
|
my $cmdline="$nghttpx --backend=$connect ".
|
||||||
"--frontend=\"*,$listenport;no-tls\" ".
|
"--frontend=\"*,$listenport;no-tls\" ".
|
||||||
"--log-level=INFO ".
|
"--log-level=INFO ".
|
||||||
"--pid-file=$pidfile ".
|
"--pid-file=$pidfile ".
|
||||||
|
@ -1227,6 +1227,7 @@ sub runhttp2server {
|
|||||||
|
|
||||||
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
|
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
|
||||||
$flags .= "--port $HTTP2PORT ";
|
$flags .= "--port $HTTP2PORT ";
|
||||||
|
$flags .= "--connect $HOSTIP:$HTTPPORT ";
|
||||||
$flags .= $verbose_flag if($debugprotocol);
|
$flags .= $verbose_flag if($debugprotocol);
|
||||||
|
|
||||||
my $cmd = "$exe $flags";
|
my $cmd = "$exe $flags";
|
||||||
|
Loading…
Reference in New Issue
Block a user