mirror of
https://github.com/moparisthebest/curl
synced 2025-01-08 12:28:06 -05:00
Always use $LOGDIR when referring to the log directory.
This commit is contained in:
parent
65ee4e4555
commit
70d834c512
@ -583,7 +583,7 @@ sub stopserver {
|
|||||||
|
|
||||||
sub verifyhttp {
|
sub verifyhttp {
|
||||||
my ($proto, $ip, $port) = @_;
|
my ($proto, $ip, $port) = @_;
|
||||||
my $cmd = "$CURL --max-time $server_response_maxtime --output log/verifiedserver --insecure --silent --verbose --globoff \"$proto://$ip:$port/verifiedserver\" 2>log/verifyhttp";
|
my $cmd = "$CURL --max-time $server_response_maxtime --output $LOGDIR/verifiedserver --insecure --silent --verbose --globoff \"$proto://$ip:$port/verifiedserver\" 2>$LOGDIR/verifyhttp";
|
||||||
my $pid;
|
my $pid;
|
||||||
|
|
||||||
# verify if our/any server is running on this port
|
# verify if our/any server is running on this port
|
||||||
@ -594,7 +594,7 @@ sub verifyhttp {
|
|||||||
my $data;
|
my $data;
|
||||||
|
|
||||||
if($res && $verbose) {
|
if($res && $verbose) {
|
||||||
open(ERR, "<log/verifyhttp");
|
open(ERR, "<$LOGDIR/verifyhttp");
|
||||||
my @e = <ERR>;
|
my @e = <ERR>;
|
||||||
close(ERR);
|
close(ERR);
|
||||||
logmsg "RUN: curl command returned $res\n";
|
logmsg "RUN: curl command returned $res\n";
|
||||||
@ -604,7 +604,7 @@ sub verifyhttp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
open(FILE, "<log/verifiedserver");
|
open(FILE, "<$LOGDIR/verifiedserver");
|
||||||
my @file=<FILE>;
|
my @file=<FILE>;
|
||||||
close(FILE);
|
close(FILE);
|
||||||
$data=$file[0]; # first line
|
$data=$file[0]; # first line
|
||||||
@ -638,7 +638,7 @@ sub verifyftp {
|
|||||||
if($proto eq "ftps") {
|
if($proto eq "ftps") {
|
||||||
$extra = "--insecure --ftp-ssl-control ";
|
$extra = "--insecure --ftp-ssl-control ";
|
||||||
}
|
}
|
||||||
my $cmd="$CURL --max-time $server_response_maxtime --silent --verbose --globoff $extra\"$proto://$ip:$port/verifiedserver\" 2>log/verifyftp";
|
my $cmd="$CURL --max-time $server_response_maxtime --silent --verbose --globoff $extra\"$proto://$ip:$port/verifiedserver\" 2>$LOGDIR/verifyftp";
|
||||||
# check if this is our server running on this port:
|
# check if this is our server running on this port:
|
||||||
my @data=runclientoutput($cmd);
|
my @data=runclientoutput($cmd);
|
||||||
logmsg "RUN: $cmd\n" if($verbose);
|
logmsg "RUN: $cmd\n" if($verbose);
|
||||||
@ -1538,7 +1538,7 @@ sub checksystem {
|
|||||||
# debug is a listed "feature", use that knowledge
|
# debug is a listed "feature", use that knowledge
|
||||||
$curl_debug = 1;
|
$curl_debug = 1;
|
||||||
# set the NETRC debug env
|
# set the NETRC debug env
|
||||||
$ENV{'CURL_DEBUG_NETRC'} = 'log/netrc';
|
$ENV{'CURL_DEBUG_NETRC'} = "$LOGDIR/netrc";
|
||||||
}
|
}
|
||||||
if($feat =~ /SSL/i) {
|
if($feat =~ /SSL/i) {
|
||||||
# ssl enabled
|
# ssl enabled
|
||||||
@ -2040,7 +2040,7 @@ sub singletest {
|
|||||||
|
|
||||||
my $usevalgrind = $valgrind && ((getpart("verify", "valgrind"))[0] !~ /disable/);
|
my $usevalgrind = $valgrind && ((getpart("verify", "valgrind"))[0] !~ /disable/);
|
||||||
if($usevalgrind) {
|
if($usevalgrind) {
|
||||||
$CMDLINE = "$valgrind ".$valgrind_tool."--leak-check=yes --num-callers=16 ${valgrind_logfile}=log/valgrind$testnum $CMDLINE";
|
$CMDLINE = "$valgrind ".$valgrind_tool."--leak-check=yes --num-callers=16 ${valgrind_logfile}=$LOGDIR/valgrind$testnum $CMDLINE";
|
||||||
}
|
}
|
||||||
|
|
||||||
$CMDLINE .= "$cmdargs >>$STDOUT 2>>$STDERR";
|
$CMDLINE .= "$cmdargs >>$STDOUT 2>>$STDERR";
|
||||||
@ -2071,7 +2071,7 @@ sub singletest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($gdbthis) {
|
if($gdbthis) {
|
||||||
open(GDBCMD, ">log/gdbcmd");
|
open(GDBCMD, ">$LOGDIR/gdbcmd");
|
||||||
print GDBCMD "set args $cmdargs\n";
|
print GDBCMD "set args $cmdargs\n";
|
||||||
print GDBCMD "show args\n";
|
print GDBCMD "show args\n";
|
||||||
close(GDBCMD);
|
close(GDBCMD);
|
||||||
@ -2079,10 +2079,10 @@ sub singletest {
|
|||||||
# run the command line we built
|
# run the command line we built
|
||||||
if ($torture) {
|
if ($torture) {
|
||||||
$cmdres = torture($CMDLINE,
|
$cmdres = torture($CMDLINE,
|
||||||
"$gdb --directory libtest $DBGCURL -x log/gdbcmd");
|
"$gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
|
||||||
}
|
}
|
||||||
elsif($gdbthis) {
|
elsif($gdbthis) {
|
||||||
runclient("$gdb --directory libtest $DBGCURL -x log/gdbcmd");
|
runclient("$gdb --directory libtest $DBGCURL -x $LOGDIR/gdbcmd");
|
||||||
$cmdres=0; # makes it always continue after a debugged run
|
$cmdres=0; # makes it always continue after a debugged run
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -2108,11 +2108,11 @@ sub singletest {
|
|||||||
logmsg "core dumped\n";
|
logmsg "core dumped\n";
|
||||||
if(0 && $gdb) {
|
if(0 && $gdb) {
|
||||||
logmsg "running gdb for post-mortem analysis:\n";
|
logmsg "running gdb for post-mortem analysis:\n";
|
||||||
open(GDBCMD, ">log/gdbcmd2");
|
open(GDBCMD, ">$LOGDIR/gdbcmd2");
|
||||||
print GDBCMD "bt\n";
|
print GDBCMD "bt\n";
|
||||||
close(GDBCMD);
|
close(GDBCMD);
|
||||||
runclient("$gdb --directory libtest -x log/gdbcmd2 -batch $DBGCURL core ");
|
runclient("$gdb --directory libtest -x $LOGDIR/gdbcmd2 -batch $DBGCURL core ");
|
||||||
# unlink("log/gdbcmd2");
|
# unlink("$LOGDIR/gdbcmd2");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2423,7 +2423,7 @@ sub singletest {
|
|||||||
if(!$src) {
|
if(!$src) {
|
||||||
$src=".";
|
$src=".";
|
||||||
}
|
}
|
||||||
my @e = valgrindparse($src, $feature{'SSL'}, "log/$l");
|
my @e = valgrindparse($src, $feature{'SSL'}, "$LOGDIR/$l");
|
||||||
if($e[0]) {
|
if($e[0]) {
|
||||||
logmsg " valgrind ERROR ";
|
logmsg " valgrind ERROR ";
|
||||||
logmsg @e;
|
logmsg @e;
|
||||||
@ -3015,7 +3015,7 @@ sub displaylogs {
|
|||||||
my @logs = readdir(DIR);
|
my @logs = readdir(DIR);
|
||||||
closedir(DIR);
|
closedir(DIR);
|
||||||
|
|
||||||
logmsg "== Contents of files in the log/ dir after test $testnum\n";
|
logmsg "== Contents of files in the $LOGDIR/ dir after test $testnum\n";
|
||||||
foreach my $log (sort @logs) {
|
foreach my $log (sort @logs) {
|
||||||
if($log =~ /\.(\.|)$/) {
|
if($log =~ /\.(\.|)$/) {
|
||||||
next; # skip "." and ".."
|
next; # skip "." and ".."
|
||||||
|
Loading…
Reference in New Issue
Block a user