Skip to content

Commit

Permalink
Update results script with current expected binary paths
Browse files Browse the repository at this point in the history
Also update README.md to reflect the current reality of building the
runner.
  • Loading branch information
ADKaster authored and trflynn89 committed Aug 14, 2023
1 parent f680ea3 commit 031b006
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,19 @@ Dependencies are:

## Usage

To clone test262, clone SerenityOS, build Lagom, and build `libjs-test262-runner`, run:
To clone test262, clone serenity and build Lagom run:

```console
./setup.sh
```

The repositories will only be cloned if they don't exist yet locally, so you
can use this script for development of the test runner as well.

If `SERENITY_SOURCE_DIR` is set, it will be used instead. However, if the Lagom
build directory already exists, the script will not touch your build in that
case, so you'll need to build `libLagom.a` yourself.
The repositories will only be cloned if they don't exist yet locally.
If `SERENITY_SOURCE_DIR` is set, it will be used to compile the runner instead of cloning serenity.

Once that's done, run:

```console
python3 main.py --libjs-test262-runner ./Build/_deps/lagom-build/bin/test262-runner --test262-root ./test262/
python3 main.py --libjs-test262-runner ./Build/bin/test262-runner --test262-root ./test262/
```

## Options
Expand Down
20 changes: 14 additions & 6 deletions run_all_and_update_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@ def get_git_commit_timestamp(path: Path) -> int:


def find_lagom_executable(test262_path: Path, serenity_path: Path, name: str):
executable_path = test262_path / f"Build/_deps/lagom-build/bin/{name}"
if not executable_path.exists():
executable_path = serenity_path / f"Build/lagom/bin/{name}"
if not executable_path.exists():
executable_path = serenity_path / f"Build/lagom/Meta/Lagom/bin/{name}"
# Build/bin: Local build
# serenity_path / Build/lagom/bin: Meta/Lagom source dir
# _deps: Local build before 2023-08-13

return executable_path
paths = [
test262_path / f"Build/bin/{name}",
serenity_path / f"Build/lagom/bin/{name}",
test262_path / f"Build/_deps/lagom-build/bin/{name}",
]

for path in paths:
if path.exists():
return path

raise RuntimeError(f"Unable to find {name}")


def main() -> None:
Expand Down

0 comments on commit 031b006

Please sign in to comment.