Changeset 29235 in webkit
- Timestamp:
- Jan 7, 2008 11:58:24 AM (16 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r29229 r29235 1 2008-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 1 14 2008-01-04 Kevin McCullough <kmccullough@apple.com> 2 15 -
trunk/WebKitTools/Scripts/run-webkit-tests
r28748 r29235 79 79 sub stripExtension($); 80 80 sub isTextOnlyTest($); 81 sub expectedDirectoryForTest($;$ );81 sub expectedDirectoryForTest($;$;$); 82 82 sub printFailureMessageForTest($$); 83 83 sub toURL($); … … 516 516 517 517 my $expected; 518 my $expectedDir = expectedDirectoryForTest($base, $isText );518 my $expectedDir = expectedDirectoryForTest($base, $isText, 0); 519 519 $expectedResultDirectory{$base} = $expectedDir; 520 520 … … 548 548 549 549 if ($pixelTests) { 550 my $expectedPixelDir = expectedDirectoryForTest($base, $isText, 1); 551 550 552 my $actualHash = ""; 551 553 my $expectedHash = ""; … … 564 566 } 565 567 566 if ($expectedHash ne $actualHash && -f "$expected Dir/$base-$expectedTag.png") {567 my $expectedPNGSize = -s "$expected Dir/$base-$expectedTag.png";568 if ($expectedHash ne $actualHash && -f "$expectedPixelDir/$base-$expectedTag.png") { 569 my $expectedPNGSize = -s "$expectedPixelDir/$base-$expectedTag.png"; 568 570 my $expectedPNG = ""; 569 open EXPECTEDPNG, "$expected Dir/$base-$expectedTag.png";571 open EXPECTEDPNG, "$expectedPixelDir/$base-$expectedTag.png"; 570 572 read(EXPECTEDPNG, $expectedPNG, $expectedPNGSize); 571 573 … … 590 592 } 591 593 592 if ($actualPNGSize && ($resetResults || !-f "$expected Dir/$base-$expectedTag.png")) {593 mkpath catfile($expected Dir, dirname($base)) if $testDirectory ne $expectedDir;594 open EXPECTED, ">", "$expected Dir/$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"; 595 597 print EXPECTED $actualPNG; 596 598 close EXPECTED; … … 598 600 599 601 # update the expected hash if the image diff said that there was no difference 600 if ($actualHash ne "" && ($resetResults || !-f "$expected Dir/$base-$expectedTag.checksum")) {601 open EXPECTED, ">", "$expected Dir/$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"; 602 604 print EXPECTED $actualHash; 603 605 close EXPECTED; … … 1338 1340 } 1339 1341 1340 sub expectedDirectoryForTest($;$ )1341 { 1342 my ($base, $isText ) = @_;1342 sub expectedDirectoryForTest($;$;$) 1343 { 1344 my ($base, $isText, $isPixelTest) = @_; 1343 1345 1344 1346 my @directories = @platformHierarchy; … … 1347 1349 1348 1350 # 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 } 1351 1359 } 1352 1360
Note: See TracChangeset
for help on using the changeset viewer.