|
1 | 1 | # LibJS test262
|
2 | 2 |
|
3 |
| -> Run the [Official ECMAScript Conformance Test Suite](https://github.com/tc39/test262) with [Ladybird](https://github.com/LadybirdWebBrowser/ladybird)'s [`LibJS`](https://github.com/LadybirdWebBrowser/ladybird/tree/master/Userland/Libraries/LibJS) |
| 3 | +Run the [Official ECMAScript Conformance Test Suite](https://github.com/tc39/test262) with [Ladybird](https://github.com/LadybirdWebBrowser/ladybird)'s [`LibJS`](https://github.com/LadybirdWebBrowser/ladybird/tree/master/Userland/Libraries/LibJS) |
4 | 4 |
|
5 | 5 | ## Installation
|
6 | 6 |
|
7 |
| -Install `git`, `cmake`, `ninja`, `gcc`/`clang` and `python3` (3.9+). |
| 7 | +First, clone and build [the Ladybird project](https://github.com/LadybirdBrowser/ladybird/blob/master/Documentation/BuildInstructionsLadybird.md). |
| 8 | +To run test262, only the `test262-runner` Ladybird target needs to be built. From the Ladybird checkout, run: |
8 | 9 |
|
9 |
| -To install the script's dependencies, run: |
| 10 | +```bash |
| 11 | +./Meta/ladybird.sh build test262-runner |
| 12 | +``` |
| 13 | + |
| 14 | +Then, in the libjs-test262 project, set up a virtual environment (optional) and install the script's dependencies: |
| 15 | + |
| 16 | +```bash |
| 17 | +virtualenv .venv |
| 18 | +source .venv/bin/activate |
10 | 19 |
|
11 |
| -```console |
12 | 20 | pip3 install -r requirements.txt
|
13 | 21 | ```
|
14 | 22 |
|
15 | 23 | Dependencies are:
|
16 | 24 |
|
17 | 25 | - `tqdm` for displaying a progress bar
|
18 | 26 |
|
19 |
| -## Usage |
| 27 | +Finally, clone or sync test262 itself: |
20 | 28 |
|
21 |
| -To clone test262, clone ladybird and build Lagom run: |
22 |
| - |
23 |
| -```console |
24 |
| -./setup.sh |
| 29 | +```bash |
| 30 | +./sync-test262.sh |
25 | 31 | ```
|
26 | 32 |
|
27 |
| -The repositories will only be cloned if they don't exist yet locally. |
28 |
| -If `LADYBIRD_SOURCE_DIR` is set, it will be used to compile the runner instead of cloning ladybird. |
| 33 | +## Usage |
29 | 34 |
|
30 |
| -Once that's done, run: |
| 35 | +In the below command, `LADYBIRD_SOURCE_DIR` should point to the Ladybird checkout. The exact path to `test262-runner` |
| 36 | +may vary depending on any extra options that were provided to `ladybird.sh` above. |
31 | 37 |
|
32 |
| -```console |
33 |
| -python3 main.py --libjs-test262-runner ./Build/bin/test262-runner --test262-root ./test262/ |
| 38 | +```bash |
| 39 | +./main.py --libjs-test262-runner "${LADYBIRD_SOURCE_DIR}/Build/ladybird/bin/test262-runner" --test262-root ./test262 |
34 | 40 | ```
|
35 | 41 |
|
36 | 42 | ## Options
|
@@ -65,9 +71,8 @@ options:
|
65 | 71 | --debug enable debug logging of the runner
|
66 | 72 | ```
|
67 | 73 |
|
68 |
| -## Current status |
| 74 | +## Results |
| 75 | + |
| 76 | +Test results are updated for every commit to the Ladybird repository. They may be viewed here: |
69 | 77 |
|
70 |
| -Most of the tests run to completion and yield correct results. Few of the test |
71 |
| -harness files do not parse yet or generate runtime errors, those are listed in |
72 |
| -the results under a separate category, as are tests that fail to parse their |
73 |
| -metadata, time out, or crash the engine (todo assertion failures, mostly). |
| 78 | +https://ladybirdbrowser.github.io/libjs-website/test262/ |
0 commit comments