removed debug output and trailing whitespace

This commit is contained in:
Daniel Stenberg 2004-05-17 10:53:34 +00:00
parent 67532e916c
commit a807065ccc
1 changed files with 20 additions and 21 deletions

View File

@ -165,7 +165,7 @@ sub torture {
system($testcmd); system($testcmd);
print " CMD: $testcmd\n" if($verbose); print " CMD: $testcmd\n" if($verbose);
# memanalyze -v is our friend, get the number of allocations made # memanalyze -v is our friend, get the number of allocations made
my $count=0; my $count=0;
my @out = `$memanalyze -v $memdump`; my @out = `$memanalyze -v $memdump`;
@ -186,25 +186,25 @@ sub torture {
my $limit = $_; my $limit = $_;
my $fail; my $fail;
my $dumped_core; my $dumped_core;
if($tortalloc && ($tortalloc != $limit)) { if($tortalloc && ($tortalloc != $limit)) {
next; next;
} }
print "Fail alloc no: $limit\r" if($verbose); print "Fail alloc no: $limit\r" if($verbose);
# make the memory allocation function number $limit return failure # make the memory allocation function number $limit return failure
$ENV{'CURL_MEMLIMIT'} = $limit; $ENV{'CURL_MEMLIMIT'} = $limit;
# remove memdump first to be sure we get a new nice and clean one # remove memdump first to be sure we get a new nice and clean one
unlink($memdump); unlink($memdump);
print "**> Alloc number $limit is now set to fail <**\n" if($gdbthis); print "**> Alloc number $limit is now set to fail <**\n" if($gdbthis);
my $ret; my $ret;
if($gdbthis) { if($gdbthis) {
system($gdbline) system($gdbline)
} }
else { else {
$ret = system($testcmd); $ret = system($testcmd);
} }
@ -479,7 +479,7 @@ sub runftpserver {
} }
sleep(1); sleep(1);
} }
# now (re-)start our server: # now (re-)start our server:
my $flag=$debugprotocol?"-v ":""; my $flag=$debugprotocol?"-v ":"";
$flag .= "-s \"$srcdir\""; $flag .= "-s \"$srcdir\"";
@ -498,7 +498,6 @@ sub runftpserver {
print "$cmd\n" if($verbose); print "$cmd\n" if($verbose);
my @data = `$cmd`; my @data = `$cmd`;
foreach $line (@data) { foreach $line (@data) {
print STDERR "We read: $_";
if ( $line =~ /WE ROOLZ: (\d+)/ ) { if ( $line =~ /WE ROOLZ: (\d+)/ ) {
$pid = 0+$1; $pid = 0+$1;
$verified = 1; $verified = 1;
@ -618,7 +617,7 @@ sub filteroff {
print OUT $_; print OUT $_;
} }
close(IN); close(IN);
close(OUT); close(OUT);
return 0; return 0;
} }
@ -766,7 +765,7 @@ sub checkcurl {
} }
####################################################################### #######################################################################
# substitute the variable stuff into either a joined up file or # substitute the variable stuff into either a joined up file or
# a command, in either case passed by reference # a command, in either case passed by reference
# #
sub subVariables { sub subVariables {
@ -805,7 +804,7 @@ sub singletest {
} }
printf("test %03d...", $testnum); printf("test %03d...", $testnum);
for(@what) { for(@what) {
my $f = $_; my $f = $_;
$f =~ s/\s//g; $f =~ s/\s//g;
@ -867,7 +866,7 @@ sub singletest {
$skipped++; $skipped++;
$skipped{$why}++; $skipped{$why}++;
$teststat[$testnum]=$why; # store reason for this test case $teststat[$testnum]=$why; # store reason for this test case
print "SKIPPED\n"; print "SKIPPED\n";
if(!$short) { if(!$short) {
print "* Test $testnum: $why\n"; print "* Test $testnum: $why\n";
@ -889,7 +888,7 @@ sub singletest {
# of the datacheck # of the datacheck
chomp($replycheck[$#replycheck]); chomp($replycheck[$#replycheck]);
} }
@reply=@replycheck; @reply=@replycheck;
} }
@ -988,7 +987,7 @@ sub singletest {
subVariables \$fileContent; subVariables \$fileContent;
# print "DEBUG: writing file " . $filename . "\n"; # print "DEBUG: writing file " . $filename . "\n";
open OUTFILE, ">$filename"; open OUTFILE, ">$filename";
binmode OUTFILE; # for crapage systems, use binary binmode OUTFILE; # for crapage systems, use binary
print OUTFILE $fileContent; print OUTFILE $fileContent;
close OUTFILE; close OUTFILE;
} }
@ -1039,7 +1038,7 @@ sub singletest {
$CMDLINE .= "$cmdargs >>$STDOUT 2>>$STDERR"; $CMDLINE .= "$cmdargs >>$STDOUT 2>>$STDERR";
if($verbose) { if($verbose) {
print "$CMDLINE\n"; print "$CMDLINE\n";
} }
print CMDLOG "$CMDLINE\n"; print CMDLOG "$CMDLINE\n";
@ -1198,7 +1197,7 @@ sub singletest {
} }
if(!$short) { if(!$short) {
print " output OK"; print " output OK";
} }
} }
if($errorcode == $cmdres) { if($errorcode == $cmdres) {
@ -1220,7 +1219,7 @@ sub singletest {
# the test succeeded, remove all log files # the test succeeded, remove all log files
if(!$keepoutfiles) { if(!$keepoutfiles) {
cleardir($LOGDIR); cleardir($LOGDIR);
} }
unlink($FTPDCMD); # remove the instructions for this test unlink($FTPDCMD); # remove the instructions for this test
@ -1293,7 +1292,7 @@ sub singletest {
print " valgrind OK"; print " valgrind OK";
} }
} }
if($short) { if($short) {
print "OK"; print "OK";
@ -1337,7 +1336,7 @@ sub startservers {
$pid = runhttpserver($verbose); $pid = runhttpserver($verbose);
if($pid <= 0) { if($pid <= 0) {
return 2; # error starting return 2; # error starting
} }
printf ("* pid http => %-5d\n", $pid) if($verbose); printf ("* pid http => %-5d\n", $pid) if($verbose);
$run{'http'}=$pid; $run{'http'}=$pid;
} }
@ -1450,12 +1449,12 @@ do {
$verbose=1; $verbose=1;
} }
elsif ($ARGV[0] eq "-c") { elsif ($ARGV[0] eq "-c") {
# use this path to curl instead of default # use this path to curl instead of default
$CURL=$ARGV[1]; $CURL=$ARGV[1];
shift @ARGV; shift @ARGV;
} }
elsif ($ARGV[0] eq "-d") { elsif ($ARGV[0] eq "-d") {
# have the servers display protocol output # have the servers display protocol output
$debugprotocol=1; $debugprotocol=1;
} }
elsif ($ARGV[0] eq "-g") { elsif ($ARGV[0] eq "-g") {
@ -1575,7 +1574,7 @@ if ( $TESTCASES eq "all") {
$TESTCASES=""; # start with no test cases $TESTCASES=""; # start with no test cases
# cut off everything but the digits # cut off everything but the digits
for(@cmds) { for(@cmds) {
$_ =~ s/[a-z\/\.]*//g; $_ =~ s/[a-z\/\.]*//g;
} }