Commit 9ce69712 authored by tony@chromium.org's avatar tony@chromium.org

2011-04-06 Tony Chang <tony@chromium.org>

        Reviewed by Darin Adler.

        teach run-webkit-tests to read checksums from png files
        https://bugs.webkit.org/show_bug.cgi?id=57993

        * Scripts/old-run-webkit-tests: Read the first 2k of a .png if there's
          no .checksum and look for the checksum in there.

git-svn-id: svn://svn.chromium.org/blink/trunk@83120 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8a220589
2011-04-06 Tony Chang <tony@chromium.org>
Reviewed by Darin Adler.
teach run-webkit-tests to read checksums from png files
https://bugs.webkit.org/show_bug.cgi?id=57993
* Scripts/old-run-webkit-tests: Read the first 2k of a .png if there's
no .checksum and look for the checksum in there.
2011-04-06 David Dorwin <ddorwin@chromium.org>
Reviewed by David Levin.
......
......@@ -105,6 +105,7 @@ sub openWebSocketServerIfNeeded();
sub pathcmp($$);
sub printFailureMessageForTest($$);
sub processIgnoreTests($$);
sub readChecksumFromPng($);
sub readFromDumpToolWithTimer(**);
sub readSkippedFiles($);
sub recordActualResultsAndDiff($$);
......@@ -740,6 +741,8 @@ for my $test (@tests) {
# Format expected hash into a suffix string that is appended to the path / URL passed to DRT
$suffixExpectedHash = "'$expectedHash";
} elsif (my $expectedHash = readChecksumFromPng(File::Spec->catfile($expectedPixelDir, "$base-$expectedTag.png"))) {
$suffixExpectedHash = "'$expectedHash";
}
}
......@@ -2454,6 +2457,15 @@ sub readSkippedFiles($)
}
}
sub readChecksumFromPng($)
{
my ($path) = @_;
my $data;
if (open(PNGFILE, $path) && read(PNGFILE, $data, 2048) && $data =~ /tEXtchecksum\0([a-fA-F0-9]{32})/) {
return $1;
}
}
my @testsFound;
sub isUsedInReftest
......
Markdown is supported
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