Skip to content

Commit a30dd09

Browse files
committed
Remove custom CMake setup in favor of using Ladybird's build
Our support for building test262-runner in a standalone manner has gone quite stale. Rather than keeping it up to date, just document using the test262-runner from the Ladybird repository. And replace the setup.sh script with a script that only clones/syncs the test262 repo.
1 parent 77520ea commit a30dd09

File tree

5 files changed

+41
-106
lines changed

5 files changed

+41
-106
lines changed

Diff for: CMakeLists.txt

-33
This file was deleted.

Diff for: README.md

+24-19
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,42 @@
11
# LibJS test262
22

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)
44

55
## Installation
66

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:
89

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
1019

11-
```console
1220
pip3 install -r requirements.txt
1321
```
1422

1523
Dependencies are:
1624

1725
- `tqdm` for displaying a progress bar
1826

19-
## Usage
27+
Finally, clone or sync test262 itself:
2028

21-
To clone test262, clone ladybird and build Lagom run:
22-
23-
```console
24-
./setup.sh
29+
```bash
30+
./sync-test262.sh
2531
```
2632

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
2934

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.
3137

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
3440
```
3541

3642
## Options
@@ -65,9 +71,8 @@ options:
6571
--debug enable debug logging of the runner
6672
```
6773

68-
## Current status
74+
## Results
75+
76+
Test results are updated for every commit to the Ladybird repository. They may be viewed here:
6977

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/

Diff for: cmake/FetchLagom.cmake

-33
This file was deleted.

Diff for: setup.sh

-21
This file was deleted.

Diff for: sync-test262.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
TEST262_SOURCE_DIR="${TEST262_SOURCE_DIR:-test262}"
3+
4+
log() {
5+
echo -e "\033[0;34m[${1}]\033[0m ${2}"
6+
}
7+
8+
if [[ -d "${TEST262_SOURCE_DIR}" ]]; then
9+
log test262 "Updating test262 directory"
10+
11+
pushd "${TEST262_SOURCE_DIR}"
12+
git pull
13+
popd
14+
else
15+
log test262 "test262 directory not found, cloning repository"
16+
git clone --depth 1 https://github.com/tc39/test262.git
17+
fi

0 commit comments

Comments
 (0)