Skip to content
runtests.pl 89.6 KiB
Newer Older
    my @logs = readdir(DIR);
    closedir(DIR);
    logmsg "== Contents of files in the $LOGDIR/ dir after test $testnum\n";
    foreach my $log (sort @logs) {
        if($log =~ /\.(\.|)$/) {
            next; # skip "." and ".."
        }
        if($log =~ /^\.nfs/) {
            next; # skip ".nfs"
        }
        if(($log eq "memdump") || ($log eq "core")) {
            next; # skip "memdump" and  "core"
        }
        if((-d "$LOGDIR/$log") || (! -s "$LOGDIR/$log")) {
            next; # skip directory and empty files
        }
        if(($log =~ /^stdout\d+/) && ($log !~ /^stdout$testnum/)) {
            next; # skip stdoutNnn of other tests
        }
        if(($log =~ /^stderr\d+/) && ($log !~ /^stderr$testnum/)) {
            next; # skip stderrNnn of other tests
        }
        if(($log =~ /^upload\d+/) && ($log !~ /^upload$testnum/)) {
            next; # skip uploadNnn of other tests
        }
        if(($log =~ /^curl\d+\.out/) && ($log !~ /^curl$testnum\.out/)) {
            next; # skip curlNnn.out of other tests
        }
        if(($log =~ /^test\d+\.txt/) && ($log !~ /^test$testnum\.txt/)) {
            next; # skip testNnn.txt of other tests
        if(($log =~ /^file\d+\.txt/) && ($log !~ /^file$testnum\.txt/)) {
            next; # skip fileNnn.txt of other tests
        }
        if(($log =~ /^valgrind\d+/) && ($log !~ /^valgrind$testnum/)) {
            next; # skip valgrindNnn of other tests
        }
        logmsg "=== Start of file $log\n";
        displaylogcontent("$LOGDIR/$log");
        logmsg "=== End of file $log\n";
#######################################################################
# The main test-loop
#

Daniel Stenberg's avatar
Daniel Stenberg committed
my $testnum;
    $lasttest = $testnum if($testnum > $lasttest);
    my $error = singletest($testnum, $count, scalar(@at));
        $failed.= "$testnum ";
        if($postmortem) {
            # display all files in log/ in a nice way
        if(!$anyway) {
            # a test failed, abort
            logmsg "\n - abort tests\n";
#######################################################################
# Close command log
#
stopservers($verbose);
    logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n",
                   $ok/$total*100);
        logmsg "TESTFAIL: These test cases failed: $failed\n";
    logmsg "TESTFAIL: No tests were performed\n";
    logmsg "TESTDONE: $all tests were considered during $sofar seconds.\n";
if($skipped) {
    logmsg "TESTINFO: $skipped tests were skipped due to these restraints:\n";
        printf "TESTINFO: \"%s\" %d times (", $r, $skipped{$_};

        # now show all test case numbers that had this reason for being
        # skipped
        my $c=0;
                logmsg ", " if($c);
                logmsg $_;
if($total && ($ok != $total)) {
    exit 1;
}