Bug 157797 - Add test262 harness support code
Summary: Add test262 harness support code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Miller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-17 09:48 PDT by Keith Miller
Modified: 2016-05-19 10:41 PDT (History)
5 users (show)

See Also:


Attachments
Patch (24.42 KB, patch)
2016-05-17 11:44 PDT, Keith Miller
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Miller 2016-05-17 09:48:31 PDT
Add test262 harness support code
Comment 1 Keith Miller 2016-05-17 11:44:51 PDT
Created attachment 279140 [details]
Patch
Comment 2 Filip Pizlo 2016-05-17 11:49:28 PDT
Comment on attachment 279140 [details]
Patch

LGTM
Comment 3 WebKit Commit Bot 2016-05-17 13:37:39 PDT
Comment on attachment 279140 [details]
Patch

Clearing flags on attachment: 279140

Committed r201039: <http://trac.webkit.org/changeset/201039>
Comment 4 WebKit Commit Bot 2016-05-17 13:37:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Csaba Osztrogonác 2016-05-18 01:20:27 PDT
Keith Miller 2016-05-17 11:44:51 PDT
Created attachment 279140 [details]
Patch

Filip Pizlo 2016-05-17 11:49:28 PDT
Comment on attachment 279140 [details]
Patch
LGTM

r+ in 5 minutes? What is the reason for this haste?

I think we could and should make the test262.yaml file less 
verbose and redundant. (bug157807)

For example, harness/assert.js and harness.sta js are included
by all "runTest262" test. I prefer adding these common harness
files to includeFiles in runTest262 function instead.

Additionally we could remove the ugly relative paths to 
harness files, all of them are in the same harness directory.
Comment 6 Csaba Osztrogonác 2016-05-18 02:03:01 PDT
One more thing to reduce redundancy. There are ~20.000 tests, 
but only 1000 tests with [onlyStrict] or [noStrict] flags.

runTest262 could handle onlyStrict and noStrict flags instead
of duplicate yaml entries for each tests. We only need two 
conditional calls of addRunCommand in runTest262.
Comment 7 Csaba Osztrogonác 2016-05-18 02:17:32 PDT
Comment on attachment 279140 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=279140&action=review

> Tools/Scripts/import-test262-tests:127
> +            @includeFiles << "donePrintHandle.js"

typo: donePrintHandle.js -> doneprintHandle.js
Comment 8 Csaba Osztrogonác 2016-05-18 02:19:08 PDT
doneprintHandle.js is needed only for async tests, 
this include can be added by runTest262
Comment 9 Csaba Osztrogonác 2016-05-18 02:31:16 PDT
I made a quick measurement. The startup time of run-javascriptcore-tests 
is 30 seconds now, adding test262.yaml increased it to 2 minutes.

I think we should make it faster before running test262 by default.
Comment 10 Keith Miller 2016-05-18 10:11:07 PDT
> I think we could and should make the test262.yaml file less 
> verbose and redundant. (bug157807)
> 
> For example, harness/assert.js and harness.sta js are included
> by all "runTest262" test. I prefer adding these common harness
> files to includeFiles in runTest262 function instead.
> 
> Additionally we could remove the ugly relative paths to 
> harness files, all of them are in the same harness directory.

The reason why I use all the relative paths is that each test's run-script is run from the directory of the test itself. If we didn't precompute the relative path then we would need to do so for each test when we create the run-script. I saw a noticeable decrease in the time it took for run-jsc-stress-tests to start when I switched to relative paths.

> One more thing to reduce redundancy. There are ~20.000 tests, 
> but only 1000 tests with [onlyStrict] or [noStrict] flags.
> 
> runTest262 could handle onlyStrict and noStrict flags instead
> of duplicate yaml entries for each tests. We only need two 
> conditional calls of addRunCommand in runTest262.

There are two entries because we might only fail one of the two modes. It's not related to processing the flags.
Comment 11 Csaba Osztrogonác 2016-05-19 10:41:11 PDT
(In reply to comment #7)
> Comment on attachment 279140 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=279140&action=review
> 
> > Tools/Scripts/import-test262-tests:127
> > +            @includeFiles << "donePrintHandle.js"
> 
> typo: donePrintHandle.js -> doneprintHandle.js

typo fix in bug157902