@@ -97,13 +97,6 @@ sub logmsg {
97
97
return main::logmsg(@_ );
98
98
}
99
99
100
- # ######################################################################
101
- # Call main's displaylogs
102
- # TODO: this will eventually stop being called in this package
103
- sub displaylogs{
104
- return main::displaylogs(@_ );
105
- }
106
-
107
100
# ######################################################################
108
101
# Check for a command in the PATH of the machine running curl.
109
102
#
@@ -389,38 +382,39 @@ sub restore_test_env {
389
382
sub singletest_startservers {
390
383
my ($testnum , $testtimings ) = @_ ;
391
384
392
- # remove test server commands file before servers are started/verified
393
- unlink ($FTPDCMD ) if (-f $FTPDCMD );
385
+ # remove old test server files before servers are started/verified
386
+ unlink ($FTPDCMD );
387
+ unlink ($SERVERIN );
388
+ unlink ($SERVER2IN );
389
+ unlink ($PROXYIN );
394
390
395
391
# timestamp required servers verification start
396
392
$$testtimings {" timesrvrini" } = Time::HiRes::time ();
397
393
398
394
my $why ;
395
+ my $error ;
399
396
if (!$listonly ) {
400
397
my @what = getpart(" client" , " server" );
401
398
if (!$what [0]) {
402
399
warn " Test case $testnum has no server(s) specified" ;
403
400
$why = " no server specified" ;
401
+ $error = -1;
404
402
} else {
405
403
my $err ;
406
404
($why , $err ) = serverfortest(@what );
407
405
if ($err == 1) {
408
- # Error indicates an actual problem starting the server, so
409
- # display the server logs
410
- displaylogs($testnum );
406
+ # Error indicates an actual problem starting the server
407
+ $error = -2;
408
+ } else {
409
+ $error = -1;
411
410
}
412
411
}
413
412
}
414
413
415
414
# timestamp required servers verification end
416
415
$$testtimings {" timesrvrend" } = Time::HiRes::time ();
417
416
418
- # remove server output logfile after servers are started/verified
419
- unlink ($SERVERIN );
420
- unlink ($SERVER2IN );
421
- unlink ($PROXYIN );
422
-
423
- return $why ;
417
+ return ($why , $error );
424
418
}
425
419
426
420
@@ -533,6 +527,11 @@ sub singletest_prepare {
533
527
}
534
528
unlink (" core" );
535
529
530
+ # remove server output logfiles after servers are started/verified
531
+ unlink ($SERVERIN );
532
+ unlink ($SERVER2IN );
533
+ unlink ($PROXYIN );
534
+
536
535
# if this section exists, it might be FTP server instructions:
537
536
my @ftpservercmd = getpart(" reply" , " servercmd" );
538
537
push @ftpservercmd , " Testnum $testnum \n " ;
@@ -915,7 +914,7 @@ sub runner_test_preprocess {
915
914
916
915
# ##################################################################
917
916
# Start the servers needed to run this test case
918
- my $why = singletest_startservers($testnum , \%testtimings );
917
+ my ( $why , $error ) = singletest_startservers($testnum , \%testtimings );
919
918
920
919
if (!$why ) {
921
920
@@ -933,9 +932,10 @@ sub runner_test_preprocess {
933
932
# Check that the test environment is fine to run this test case
934
933
if (!$listonly ) {
935
934
$why = singletest_precheck($testnum );
935
+ $error = -1;
936
936
}
937
937
}
938
- return ($why , \%testtimings );
938
+ return ($why , $error , \%testtimings );
939
939
}
940
940
941
941
0 commit comments