Commit a8d2e117 authored by lars's avatar lars

Reviewed by Adam Roben.

        run-webkit-tests does now not generate new results by default anymore. 
        You'll have to pass the --new-tests flag to it to force it to do so.

        This is required to make it possible to have tests running on multiple 
        platforms peacefully together.



git-svn-id: svn://svn.chromium.org/blink/trunk@18976 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c640206d
2007-01-19 Lars Knoll <lars@trolltech.com>
Reviewed by Adam Roben.
run-webkit-tests does now not generate new results by default anymore.
You'll have to pass the --new-tests flag to it to force it to do so.
This is required to make it possible to have tests running on multiple
platforms peacefully together.
* Scripts/run-webkit-tests:
2007-01-18 Darin Adler <darin@apple.com> 2007-01-18 Darin Adler <darin@apple.com>
Reviewed by John Sullivan. Reviewed by John Sullivan.
......
...@@ -94,6 +94,7 @@ my $threaded = 0; ...@@ -94,6 +94,7 @@ my $threaded = 0;
my $verbose = 0; my $verbose = 0;
my $useValgrind = 0; my $useValgrind = 0;
my $strictTesting = 0; my $strictTesting = 0;
my $generateNewResults = 0;
my $expectedTag = "expected"; my $expectedTag = "expected";
if (isCygwin()) { if (isCygwin()) {
...@@ -133,6 +134,7 @@ my $usage = ...@@ -133,6 +134,7 @@ my $usage =
" -q|--quiet Less verbose output\n" . " -q|--quiet Less verbose output\n" .
" -r|--repaint-tests Run repaint tests (implies --pixel-tests)\n" . " -r|--repaint-tests Run repaint tests (implies --pixel-tests)\n" .
" --reset-results Reset ALL results (including pixel tests if --pixel-tests is set)\n" . " --reset-results Reset ALL results (including pixel tests if --pixel-tests is set)\n" .
" --new-tests Generate results for new tests\n" .
" -o|--results-directory Output results directory (default: " . $testResultsDirectory . ")\n" . " -o|--results-directory Output results directory (default: " . $testResultsDirectory . ")\n" .
" -1|--singly Isolate each test case run (implies --verbose)\n" . " -1|--singly Isolate each test case run (implies --verbose)\n" .
" --slowest Report the 10 slowest tests\n" . " --slowest Report the 10 slowest tests\n" .
...@@ -160,6 +162,7 @@ my $getOptionsResult = GetOptions( ...@@ -160,6 +162,7 @@ my $getOptionsResult = GetOptions(
'quiet|q' => \$quiet, 'quiet|q' => \$quiet,
'repaint-tests|r' => \$repaintTests, 'repaint-tests|r' => \$repaintTests,
'reset-results' => \$resetResults, 'reset-results' => \$resetResults,
'new-tests' => \$generateNewResults,
'results-directory|o=s' => \$testResultsDirectory, 'results-directory|o=s' => \$testResultsDirectory,
'singly|1' => \$singly, 'singly|1' => \$singly,
'slowest' => \$report10Slowest, 'slowest' => \$report10Slowest,
...@@ -499,15 +502,25 @@ for my $test (@tests) { ...@@ -499,15 +502,25 @@ for my $test (@tests) {
$atLineStart = 1; $atLineStart = 1;
} }
$result = "new"; $result = "new";
# Create the path if needed if ($generateNewResults) {
mkpath(catfile($expectedTestResultsDirectory, dirname($base))) if $testDirectory ne $expectedTestResultsDirectory; # Create the path if needed
mkpath(catfile($expectedTestResultsDirectory, dirname($base))) if $testDirectory ne $expectedTestResultsDirectory;
open EXPECTED, ">", "$expectedTestResultsDirectory/$base-$expectedTag.txt" or die "could not create $expectedTestResultsDirectory/$base-$expectedTag.txt\n";
print EXPECTED $actual; open EXPECTED, ">", "$expectedTestResultsDirectory/$base-$expectedTag.txt" or die "could not create $expectedTestResultsDirectory/$base-$expectedTag.txt\n";
close EXPECTED; print EXPECTED $actual;
close EXPECTED;
}
unlink "$testResultsDirectory/$base-$actualTag.txt"; unlink "$testResultsDirectory/$base-$actualTag.txt";
unlink "$testResultsDirectory/$base-$diffsTag.txt"; unlink "$testResultsDirectory/$base-$diffsTag.txt";
# Always print the file name for new tests, as they will probably need some manual inspection.
# in verbose mode we already printed the test case, so no need to do it again.
unless ($verbose) {
print "\n" unless $atLineStart;
print "$test -> ";
}
print "new\n";
$atLineStart = 1;
} elsif ($actual eq $expected && $diffResult eq "passed") { } elsif ($actual eq $expected && $diffResult eq "passed") {
if ($verbose) { if ($verbose) {
print "succeeded\n"; print "succeeded\n";
......
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