Title: [155092] trunk
Revision
155092
Author
[email protected]
Date
2013-09-04 21:44:02 -0700 (Wed, 04 Sep 2013)

Log Message

run-_javascript_core-tests should run-fast-jsc as well
https://bugs.webkit.org/show_bug.cgi?id=120722

Tools: 

Reviewed by Geoffrey Garen.
        
Makes run-_javascript_core-tests run the fast/js tests via run-fast-jsc tool.
Integrates run-fast-jsc's error reporting into run-_javascript_core-tests.

* Scripts/run-_javascript_core-tests:
(printThingsFound):

LayoutTests: 

Reviewed by Geoffrey Garen.
        
Make all run-fast-jsc tests pass:
        
- We should always define successfullyParsed and we shouldn't falsify it
  when a test fails. This was already true in js-test-pre.
        
- Object-defineProperty() depends on DOM-like global object behavior.
  Remove the test from the run-fast-jsc list.

* fast/js/jsc-test-list:
* fast/js/resources/standalone-pre.js:
(testFailed):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (155091 => 155092)


--- trunk/LayoutTests/ChangeLog	2013-09-05 03:13:24 UTC (rev 155091)
+++ trunk/LayoutTests/ChangeLog	2013-09-05 04:44:02 UTC (rev 155092)
@@ -1,5 +1,24 @@
 2013-09-04  Filip Pizlo  <[email protected]>
 
+        run-_javascript_core-tests should run-fast-jsc as well
+        https://bugs.webkit.org/show_bug.cgi?id=120722
+
+        Reviewed by Geoffrey Garen.
+        
+        Make all run-fast-jsc tests pass:
+        
+        - We should always define successfullyParsed and we shouldn't falsify it
+          when a test fails. This was already true in js-test-pre.
+        
+        - Object-defineProperty() depends on DOM-like global object behavior.
+          Remove the test from the run-fast-jsc list.
+
+        * fast/js/jsc-test-list:
+        * fast/js/resources/standalone-pre.js:
+        (testFailed):
+
+2013-09-04  Filip Pizlo  <[email protected]>
+
         run-fast-jsc should work with new-school fast/js tests that loop until the DFG tiers up
         https://bugs.webkit.org/show_bug.cgi?id=120697
 

Modified: trunk/LayoutTests/fast/js/jsc-test-list (155091 => 155092)


--- trunk/LayoutTests/fast/js/jsc-test-list	2013-09-05 03:13:24 UTC (rev 155091)
+++ trunk/LayoutTests/fast/js/jsc-test-list	2013-09-05 04:44:02 UTC (rev 155092)
@@ -345,7 +345,6 @@
 fast/js/object-bad-time
 fast/js/Object-create
 fast/js/Object-defineProperties
-fast/js/Object-defineProperty
 fast/js/Object-getOwnPropertyNames
 fast/js/Object-keys
 fast/js/object-literal-direct-put

Modified: trunk/LayoutTests/fast/js/resources/standalone-pre.js (155091 => 155092)


--- trunk/LayoutTests/fast/js/resources/standalone-pre.js	2013-09-05 03:13:24 UTC (rev 155091)
+++ trunk/LayoutTests/fast/js/resources/standalone-pre.js	2013-09-05 04:44:02 UTC (rev 155092)
@@ -7,7 +7,7 @@
     numberOfDFGCompiles: numberOfDFGCompiles
 };
 
-var silentTestPass, didPassSomeTestsSilently, didFailSomeTests;
+var silentTestPass, didPassSomeTestsSilently, didFailSomeTests, successfullyParsed;
 silentTestPass = false;
 didPassSomeTestsSilenty = false;
 didFaileSomeTests = false;
@@ -40,7 +40,6 @@
 function testFailed(msg)
 {
     didFailSomeTests = true;
-    errorMessage = msg;
     print("FAIL", escapeString(msg));
 }
 

Modified: trunk/Tools/ChangeLog (155091 => 155092)


--- trunk/Tools/ChangeLog	2013-09-05 03:13:24 UTC (rev 155091)
+++ trunk/Tools/ChangeLog	2013-09-05 04:44:02 UTC (rev 155092)
@@ -1,3 +1,16 @@
+2013-09-04  Filip Pizlo  <[email protected]>
+
+        run-_javascript_core-tests should run-fast-jsc as well
+        https://bugs.webkit.org/show_bug.cgi?id=120722
+
+        Reviewed by Geoffrey Garen.
+        
+        Makes run-_javascript_core-tests run the fast/js tests via run-fast-jsc tool.
+        Integrates run-fast-jsc's error reporting into run-_javascript_core-tests.
+
+        * Scripts/run-_javascript_core-tests:
+        (printThingsFound):
+
 2013-09-04  Sergio Correia  <[email protected]>
 
         [EFL][WK2] Move ShouldGoToBackForwardListItem to the list of passing API tests

Modified: trunk/Tools/Scripts/run-_javascript_core-tests (155091 => 155092)


--- trunk/Tools/Scripts/run-_javascript_core-tests	2013-09-05 03:13:24 UTC (rev 155091)
+++ trunk/Tools/Scripts/run-_javascript_core-tests	2013-09-05 04:44:02 UTC (rev 155092)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-# Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+# Copyright (C) 2005, 2013 Apple Computer, Inc.  All rights reserved.
 # Copyright (C) 2007 Eric Seidel <[email protected]>
 #
 # Redistribution and use in source and binary forms, with or without
@@ -27,11 +27,14 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-# Script to run the WebKit Open Source Project _javascript_Core tests (adapted from Mozilla).
+# Script to run the WebKit Open Source Project _javascript_Core tests (adapted from Mozilla),
+# as well as other tests: testapi on Mac and LayoutTests/fast/js.
 
 use strict;
+use File::Slurp;
 use FindBin;
 use Getopt::Long qw(:config pass_through);
+use List::Util qw(min max);
 use lib $FindBin::Bin;
 use webkitdirs;
 use POSIX;
@@ -139,7 +142,7 @@
 chdirWebKit();
 chdir("Source/_javascript_Core");
 chdir "tests/mozilla" or die "Failed to switch directory to 'tests/mozilla'\n";
-my @jsDriverCmd = ("perl", "jsDriver.pl", "-e", "squirrelfish", "-s", jscPath($productDir), "-f", "actual.html", @jsArgs);
+my @jsMozillaDriverCmd = ("perl", "jsDriver.pl", "-e", "squirrelfish", "-s", jscPath($productDir), "-f", "actual.html", @jsArgs);
 if (isGtk() || isEfl()) {
     my @jhbuildPrefix = sourceDir() . "/Tools/jhbuild/jhbuild-wrapper";
 
@@ -150,15 +153,15 @@
     }
     push(@jhbuildPrefix, 'run');
 
-    unshift(@jsDriverCmd, @jhbuildPrefix);
+    unshift(@jsMozillaDriverCmd, @jhbuildPrefix);
 } elsif (isIOSWebKit() && willUseIOSSimulatorSDKWhenBuilding()) {
-    push @jsDriverCmd, ("--sdk", xcodeSDK());
+    push @jsMozillaDriverCmd, ("--sdk", xcodeSDK());
 }
-print "Running: " . join(" ", @jsDriverCmd) . "\n";
-my $result = system(@jsDriverCmd);
+print "Running: " . join(" ", @jsMozillaDriverCmd) . "\n";
+my $result = system(@jsMozillaDriverCmd);
 exit exitStatus($result)  if $result;
 
-my %failures;
+my %mozillaFailures;
 
 open EXPECTED, "expected.html" or die "Failed to open 'expected.html'\n";
 while (<EXPECTED>) {
@@ -166,11 +169,11 @@
 }
 while (<EXPECTED>) {
     chomp;
-    $failures{$_} = 1;
+    $mozillaFailures{$_} = 1;
 }
 close EXPECTED;
 
-my %newFailures;
+my %newMozillaFailures;
 
 open ACTUAL, "actual.html" or die "Failed to open 'actual.html'";
 while (<ACTUAL>) {
@@ -178,41 +181,78 @@
 }
 while (<ACTUAL>) {
     chomp;
-    if ($failures{$_}) {
-        delete $failures{$_};
+    if ($mozillaFailures{$_}) {
+        delete $mozillaFailures{$_};
     } else {
-        $newFailures{$_} = 1;
+        $newMozillaFailures{$_} = 1;
     }
 }
 close ACTUAL;
 
-my $numNewFailures = keys %newFailures;
-if ($numNewFailures) {
-    print "\n** Danger, Will Robinson! Danger! The following failures have been introduced:\n";
-    foreach my $failure (sort keys %newFailures) {
-        print "\t$failure\n";
+# Run the fast/js tests.
+chdirWebKit();
+my $fastJSResultsDir = $productDir . "/fast-jsc-results";
+my @fastJSDriverCmd = ("/bin/sh", "Tools/Scripts/run-fast-jsc", "-j", jscPath($productDir), "-r", $fastJSResultsDir, "-t", "LayoutTests");
+print "Running: " . join(" ", @fastJSDriverCmd) . "\n";
+$result = system(@fastJSDriverCmd);
+exit exitStatus($result) if $result;
+
+my $numNewMozillaFailures = keys %newMozillaFailures;
+if ($numNewMozillaFailures) {
+    print "\n** The following Mozilla test failures have been introduced:\n";
+    foreach my $mozillaFailure (sort keys %newMozillaFailures) {
+        print "\t$mozillaFailure\n";
     }
 }
 
-my $numOldFailures = keys %failures;
-if ($numOldFailures) {
+my $numOldMozillaFailures = keys %mozillaFailures;
+if ($numOldMozillaFailures) {
     print "\nYou fixed the following test";
-    print "s" if $numOldFailures != 1;
+    print "s" if $numOldMozillaFailures != 1;
     print ":\n";
-    foreach my $failure (sort keys %failures) {
-        print "\t$failure\n";
+    foreach my $mozillaFailure (sort keys %mozillaFailures) {
+        print "\t$mozillaFailure\n";
     }
 }
 
+sub printThingsFound
+{
+    my ($number, $label, $pluralLabel, $verb) = @_;
+    print "    $number ";
+    if ($number == 1) {
+        print $label;
+    } else {
+        print $pluralLabel;
+    }
+    print " $verb.\n";
+}
+
+my @fastJSFailList = eval { read_file($fastJSResultsDir . "/failed") };
+my @fastJSCrashList = eval { read_file($fastJSResultsDir . "/crashed") };
+my $numJSFailures = @fastJSFailList;
+my $numJSCrashes = @fastJSCrashList;
+
+if ($numJSFailures || $numJSCrashes) {
+    print "\n** The following fast/js test failures have been introduced:\n";
+    foreach my $testFailure (@fastJSFailList, @fastJSCrashList) {
+        print "\t$testFailure";
+    }
+}
+
 print "\n";
 
-print "$numNewFailures regression";
-print "s" if $numNewFailures != 1;
-print " found.\n";
+print "Results for Mozilla tests:\n";
+printThingsFound($numNewMozillaFailures, "regression", "regressions", "found");
+printThingsFound($numOldMozillaFailures, "test", "tests", "fixed");
+print "    OK.\n" if $numNewMozillaFailures == 0;
 
-print "$numOldFailures test";
-print "s" if $numOldFailures != 1;
-print " fixed.\n";
+print "\n";
 
-print "OK.\n" if $numNewFailures == 0;
-exit(1)  if $numNewFailures;
+print "Results for fast/js tests:\n";
+printThingsFound($numJSFailures, "failure", "failures", "found");
+printThingsFound($numJSCrashes, "crash", "crashes", "found");
+print "    OK.\n" if $numJSFailures == 0 && $numJSCrashes == 0;
+
+print "\n";
+
+exit(1)  if $numNewMozillaFailures || $numJSFailures || $numJSCrashes;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to