+2007-08-12 Adam Roben <aroben@apple.com>
+
+ Factor some common code into a stripExtension() subroutine.
+
+ Reviewed by Lars.
+
+ * Scripts/run-webkit-tests: Also removed some debugging output.
+
2007-08-11 Matt Lilek <pewtermoose@gmail.com>
Reviewed over and over and over by Adam Roben.
sub processIgnoreTests($);
sub slowestcmp($$);
sub splitpath($);
+sub stripExtension($);
sub isTextOnlyTest($);
sub expectedDirectoryForTest($);
sub printFailureMessageForTest($$);
openDumpTool();
- my $base = $test;
- $base =~ s/\.[a-zA-Z]+$//;
+ my $base = stripExtension($test);
if ($verbose) {
print "running $test -> ";
print HTML "<p>Tests where results did not match expected results:</p>\n";
print HTML "<table>\n";
for my $test (@{$tests{mismatch}}) {
- my $base = $test;
- $base =~ s/\.[a-zA-Z]+$//;
+ my $base = stripExtension($test);
print HTML "<tr>\n";
print HTML "<td><a href=\"" . toURL("$testDirectory/$test") . "\">$test</a></td>\n";
print HTML htmlForExpectedAndActualResults($base);
print HTML "<p>Tests that caused the DumpRenderTree tool to crash:</p>\n";
print HTML "<table>\n";
for my $test (@{$tests{crash}}) {
- my $base = $test;
- $base =~ s/\.[a-zA-Z]+$//;
+ my $base = stripExtension($test);
my $expectedDir = expectedDirectoryForTest($base);
print HTML "<tr>\n";
print HTML "<td><a href=\"" . toURL("$testDirectory/$test") . "\">$base</a></td>\n";
print HTML "<p>Tests that had no expected results (probably new):</p>\n";
print HTML "<table>\n";
for my $test (@{$tests{new}}) {
- my $base = $test;
- $base =~ s/\.[a-zA-Z]+$//;
+ my $base = stripExtension($test);
my $expectedDir = expectedDirectoryForTest($base);
print HTML "<tr>\n";
print HTML "<td><a href=\"" . toURL("$testDirectory/$test") . "\">$base</a></td>\n";
}
}
+sub stripExtension($)
+{
+ my ($test) = @_;
+
+ $test =~ s/\.[a-zA-Z]+$//;
+ return $test;
+}
+
sub isTextOnlyTest($)
{
my ($actual) = @_;
my @hierarchy;
for (my $i=0; $i < @platforms; $i++) {
my $scoped = join('-', @platforms[0..($#platforms - $i)]);
- print "scoped = $scoped\n";
push(@hierarchy, $scoped) if (-d $scoped);
}