Commit 17183071 authored by aroben@apple.com's avatar aroben@apple.com
Browse files

Move code that counts finished tests into a subroutine

        Reviewed by Eric Seidel.

        * Scripts/run-webkit-tests:
        (sub countFinishedTest): Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4e2c3a91
2008-04-17 Adam Roben <aroben@apple.com>
Move code that counts finished tests into a subroutine
Reviewed by Eric Seidel.
* Scripts/run-webkit-tests:
(sub countFinishedTest): Added.
2008-04-17 Adam Roben <aroben@apple.com>
 
Move code that handles a crash into a subroutine
......
......@@ -81,6 +81,7 @@ sub splitpath($);
sub stripExtension($);
sub isTextOnlyTest($);
sub expectedDirectoryForTest($;$;$);
sub countFinishedTest($$$$);
sub testCrashed($$$$);
sub printFailureMessageForTest($$);
sub toURL($);
......@@ -839,22 +840,6 @@ for my $test (@tests) {
}
}
if (($count + 1) % $testsPerDumpTool == 0 || $count == $#tests) {
if ($shouldCheckLeaks) {
my $fileName;
if ($testsPerDumpTool == 1) {
$fileName = "$testResultsDirectory/$base-leaks.txt";
} else {
$fileName = "$testResultsDirectory/" . fileNameWithNumber($dumpToolName, $leaksOutputFileNumber) . "-leaks.txt";
}
my $leakCount = countAndPrintLeaks($dumpToolName, $dumpToolPID, $fileName);
$totalLeaks += $leakCount;
$leaksOutputFileNumber++ if ($leakCount);
}
closeDumpTool();
}
if ($error) {
my $dir = "$testResultsDirectory/$base";
$dir =~ s|/([^/]+)$|| or die "Failed to find test name from base\n";
......@@ -868,10 +853,7 @@ for my $test (@tests) {
push @{$tests{error}}, $test;
}
$count++;
$counts{$result}++;
push @{$tests{$result}}, $test;
$testType{$test} = $isText;
countFinishedTest($test, $base, $result, $isText);
}
printf "\n%0.2fs total testing time\n", (time - $overallStartTime) . "";
......@@ -1453,6 +1435,31 @@ sub expectedDirectoryForTest($;$;$)
return $isText ? $expectedDirectory : $platformHierarchy[$#platformHierarchy];
}
sub countFinishedTest($$$$) {
my ($test, $base, $result, $isText) = @_;
if (($count + 1) % $testsPerDumpTool == 0 || $count == $#tests) {
if ($shouldCheckLeaks) {
my $fileName;
if ($testsPerDumpTool == 1) {
$fileName = "$testResultsDirectory/$base-leaks.txt";
} else {
$fileName = "$testResultsDirectory/" . fileNameWithNumber($dumpToolName, $leaksOutputFileNumber) . "-leaks.txt";
}
my $leakCount = countAndPrintLeaks($dumpToolName, $dumpToolPID, $fileName);
$totalLeaks += $leakCount;
$leaksOutputFileNumber++ if ($leakCount);
}
closeDumpTool();
}
$count++;
$counts{$result}++;
push @{$tests{$result}}, $test;
$testType{$test} = $isText;
}
sub testCrashed($$$$) {
my ($test, $base, $actual, $error) = @_;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment