Changeset 29235 in webkit


Ignore:
Timestamp:
Jan 7, 2008 11:58:24 AM (16 years ago)
Author:
Nikolas Zimmermann
Message:

Fixes: http://bugs.webkit.org/show_bug.cgi?id=16244
DRT doesn't handle platform specific pixel test results correctly.

<test>-expected.txt files and <test>-expected.png files may now live
in different directories (ie. a cross-platform <test>-expected.txt file
and a platform-specific <test>-expected.png file).

Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r29229 r29235  
     12008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
     2
     3        Reviewed by Adam.
     4
     5        Fixes: http://bugs.webkit.org/show_bug.cgi?id=16244
     6        DRT doesn't handle platform specific pixel test results correctly.
     7
     8        <test>-expected.txt files and <test>-expected.png files may now live
     9        in different directories (ie. a cross-platform <test>-expected.txt file
     10        and a platform-specific <test>-expected.png file).
     11
     12        * Scripts/run-webkit-tests:
     13
    1142008-01-04  Kevin McCullough  <kmccullough@apple.com>
    215
  • trunk/WebKitTools/Scripts/run-webkit-tests

    r28748 r29235  
    7979sub stripExtension($);
    8080sub isTextOnlyTest($);
    81 sub expectedDirectoryForTest($;$);
     81sub expectedDirectoryForTest($;$;$);
    8282sub printFailureMessageForTest($$);
    8383sub toURL($);
     
    516516
    517517    my $expected;
    518     my $expectedDir = expectedDirectoryForTest($base, $isText);
     518    my $expectedDir = expectedDirectoryForTest($base, $isText, 0);
    519519    $expectedResultDirectory{$base} = $expectedDir;
    520520
     
    548548   
    549549    if ($pixelTests) {
     550        my $expectedPixelDir = expectedDirectoryForTest($base, $isText, 1);
     551
    550552        my $actualHash = "";
    551553        my $expectedHash = "";
     
    564566        }
    565567
    566         if ($expectedHash ne $actualHash && -f "$expectedDir/$base-$expectedTag.png") {
    567             my $expectedPNGSize = -s "$expectedDir/$base-$expectedTag.png";
     568        if ($expectedHash ne $actualHash && -f "$expectedPixelDir/$base-$expectedTag.png") {
     569            my $expectedPNGSize = -s "$expectedPixelDir/$base-$expectedTag.png";
    568570            my $expectedPNG = "";
    569             open EXPECTEDPNG, "$expectedDir/$base-$expectedTag.png";
     571            open EXPECTEDPNG, "$expectedPixelDir/$base-$expectedTag.png";
    570572            read(EXPECTEDPNG, $expectedPNG, $expectedPNGSize);
    571573
     
    590592        }
    591593
    592         if ($actualPNGSize && ($resetResults || !-f "$expectedDir/$base-$expectedTag.png")) {
    593             mkpath catfile($expectedDir, dirname($base)) if $testDirectory ne $expectedDir;
    594             open EXPECTED, ">", "$expectedDir/$base-expected.png" or die "could not create $expectedDir/$base-expected.png\n";
     594        if ($actualPNGSize && ($resetResults || !-f "$expectedPixelDir/$base-$expectedTag.png")) {
     595            mkpath catfile($expectedPixelDir, dirname($base)) if $testDirectory ne $expectedPixelDir;
     596            open EXPECTED, ">", "$expectedPixelDir/$base-expected.png" or die "could not create $expectedPixelDir/$base-expected.png\n";
    595597            print EXPECTED $actualPNG;
    596598            close EXPECTED;
     
    598600
    599601        # update the expected hash if the image diff said that there was no difference
    600         if ($actualHash ne "" && ($resetResults || !-f "$expectedDir/$base-$expectedTag.checksum")) {
    601             open EXPECTED, ">", "$expectedDir/$base-$expectedTag.checksum" or die "could not create $expectedDir/$base-$expectedTag.checksum\n";
     602        if ($actualHash ne "" && ($resetResults || !-f "$expectedPixelDir/$base-$expectedTag.checksum")) {
     603            open EXPECTED, ">", "$expectedPixelDir/$base-$expectedTag.checksum" or die "could not create $expectedPixelDir/$base-$expectedTag.checksum\n";
    602604            print EXPECTED $actualHash;
    603605            close EXPECTED;
     
    13381340}
    13391341
    1340 sub expectedDirectoryForTest($;$)
    1341 {
    1342     my ($base, $isText) = @_;
     1342sub expectedDirectoryForTest($;$;$)
     1343{
     1344    my ($base, $isText, $isPixelTest) = @_;
    13431345
    13441346    my @directories = @platformHierarchy;
     
    13471349
    13481350    # If we already have expected results, just return their location.
    1349     foreach my $directory (@directories) {
    1350         return $directory if (-f "$directory/$base-$expectedTag.txt");
     1351    if ($isPixelTest) {
     1352        foreach my $directory (@directories) {
     1353            return $directory if (-f "$directory/$base-$expectedTag.png");
     1354        }
     1355    } else {
     1356        foreach my $directory (@directories) {
     1357            return $directory if (-f "$directory/$base-$expectedTag.txt");
     1358        }
    13511359    }
    13521360
Note: See TracChangeset for help on using the changeset viewer.