Giter Site home page Giter Site logo

idanho / libjs-test262 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linusg/libjs-test262

0.0 1.0 0.0 68 KB

Run the test262 ECMAScript test suite with SerenityOS's LibJS

License: MIT License

Python 46.07% Shell 0.92% CMake 4.97% C++ 48.04%

libjs-test262's Introduction

LibJS test262

Run the Official ECMAScript Conformance Test Suite with SerenityOS's LibJS

Installation

Install git, cmake, ninja, gcc/clang and python3 (3.9+).

To install the script's dependencies, run:

pip3 install -r requirements.txt

Dependencies are:

  • tqdm for displaying a progress bar

Usage

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

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

Once that's done, run:

python3 main.py --libjs-test262-runner ./Build/libjs-test262-runner --test262-root ./test262/

Options

usage: main.py [-h] -j PATH [-b] -t PATH [-p PATTERN] [-c CONCURRENCY] [--timeout TIMEOUT] [--memory-limit MEMORY_LIMIT] [--json] [--per-file] [-s | -v] [-f] [--parse-only] [--ignore IGNORE]

Run the test262 ECMAScript test suite with SerenityOS's LibJS

optional arguments:
  -h, --help            show this help message and exit
  -j PATH, --libjs-test262-runner PATH
                        path to the 'libjs-test262-runner' binary
  -b, --use-bytecode    Use the bytecode interpreter to run the tests
  -t PATH, --test262-root PATH
                        path to the 'test262' directory
  -p PATTERN, --pattern PATTERN
                        glob pattern used for test file searching (defaults to test/**/*.js)
  -c CONCURRENCY, --concurrency CONCURRENCY
                        number of concurrent workers (defaults to number of CPU cores)
  --timeout TIMEOUT     timeout for each test run in seconds (defaults to 10)
  --memory-limit MEMORY_LIMIT
                        memory limit for each test run in megabytes (defaults to 512)
  --json                print the test results as JSON
  --per-file            show per-file results instead of per-directory results
  -s, --silent          don't print any progress information
  -v, --verbose         print output of test runs
  -f, --fail-only       only show failed tests
  --parse-only          only parse the test files and fail/pass based on that
  --ignore IGNORE       ignore any tests matching the glob

Current status

Most of the tests run to completion and yield correct results. Few of the test harness files do not parse yet or generate runtime errors, those are listed in the results under a separate category, as are tests that fail to parse their metadata, time out, or crash the engine (todo assertion failures, mostly).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.