Bug 144241 - Import tests from TC39 tests262
Summary: Import tests from TC39 tests262
Status: RESOLVED DUPLICATE of bug 157807
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-26 16:32 PDT by Ryosuke Niwa
Modified: 2016-08-30 11:27 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2015-04-26 16:32:28 PDT
We should import tests from https://github.com/tc39/test262

Their tests for class syntax, for example, caught a few bugs as well as crashes!
I've been using their python script to run tests as follows:
./tools/packaging/test262.py --command="/Volumes/Data/webkit/Tools/Scripts/run-jsc --no-show-dyld"

after applying the following change to run-jsc:

Index: Tools/Scripts/run-jsc
===================================================================
--- Tools/Scripts/run-jsc	(revision 183315)
+++ Tools/Scripts/run-jsc	(working copy)
@@ -39,17 +39,23 @@
 my $usage = "Usage: run-jsc [--count run_count] shell_file [file2...]";
 
 my $count = 1;
-GetOptions("count|c=i" => \$count);
+my $noShowDyld = 0;
+GetOptions(("count|c=i" => \$count, "no-show-dyld" => \$noShowDyld));
 
 my $jsc = jscProductDir() . "/jsc @ARGV";
 
 my $dyld = jscProductDir();
 
 $ENV{"DYLD_FRAMEWORK_PATH"} = $dyld;
-print STDERR "Running $count time(s): DYLD_FRAMEWORK_PATH=$dyld $jsc\n";
+
+if (!$noShowDyld) {
+    print STDERR "Running $count time(s): DYLD_FRAMEWORK_PATH=$dyld $jsc\n";
+}
+
 while ($count--) {
-    if (system("$jsc") != 0) {
-        last;
+    my $exit_code = system("$jsc");
+    if ($exit_code != 0) {
+        exit($exit_code >> 8);
     }
 }
Comment 1 Yusuke Suzuki 2015-04-27 10:12:05 PDT
This is really exciting issue!
As far as I know, we can execute each test262 test by executing it with the test harness script. So I think we can adopt test262 into JSC tests :D

I'll check the current W3C test import process...
Comment 2 Yusuke Suzuki 2016-08-30 11:27:27 PDT

*** This bug has been marked as a duplicate of bug 157807 ***