Changeset 83120 in webkit


Ignore:
Timestamp:
Apr 6, 2011 4:27:46 PM (13 years ago)
Author:
tony@chromium.org
Message:

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.
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r83112 r83120  
     12011-04-06  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        teach run-webkit-tests to read checksums from png files
     6        https://bugs.webkit.org/show_bug.cgi?id=57993
     7
     8        * Scripts/old-run-webkit-tests: Read the first 2k of a .png if there's
     9          no .checksum and look for the checksum in there.
     10
    1112011-04-06  David Dorwin  <ddorwin@chromium.org>
    212
  • trunk/Tools/Scripts/old-run-webkit-tests

    r83055 r83120  
    106106sub printFailureMessageForTest($$);
    107107sub processIgnoreTests($$);
     108sub readChecksumFromPng($);
    108109sub readFromDumpToolWithTimer(**);
    109110sub readSkippedFiles($);
     
    741742            # Format expected hash into a suffix string that is appended to the path / URL passed to DRT
    742743            $suffixExpectedHash = "'$expectedHash";
     744        } elsif (my $expectedHash = readChecksumFromPng(File::Spec->catfile($expectedPixelDir, "$base-$expectedTag.png"))) {
     745            $suffixExpectedHash = "'$expectedHash";
    743746        }
    744747    }
     
    24552458}
    24562459
     2460sub readChecksumFromPng($)
     2461{
     2462    my ($path) = @_;
     2463    my $data;
     2464    if (open(PNGFILE, $path) && read(PNGFILE, $data, 2048) && $data =~ /tEXtchecksum\0([a-fA-F0-9]{32})/) {
     2465        return $1;
     2466    }
     2467}
     2468
    24572469my @testsFound;
    24582470
Note: See TracChangeset for help on using the changeset viewer.