Skip to content

Run test262 tests in CI #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nickva
Copy link
Contributor

@nickva nickva commented May 13, 2025

Run test262 tests for Linux, macOS and Cosmopolitan

Add a Makefile test2-bootstrap helper to clone and patch test262 tests at a particular commit. Running with the latest commit noticed a few tests were failing and added them to the errors list.

Noticed a few flaky staging math tests (acosh and cbrt) and made a PR to test262 to fix those.

The CI environment, especially for macOS, was a bit more unpredictable and was failing in atomics tests due to lower timeouts in the atomicsHelper so double the timeouts. The time didn't worsen too much. It still takes about 2-3 min.

@nickva nickva mentioned this pull request May 13, 2025
@nickva nickva force-pushed the run-test262-in-ci branch 12 times, most recently from 8ee7286 to 24e9e37 Compare May 19, 2025 16:19
@nickva nickva force-pushed the run-test262-in-ci branch 4 times, most recently from 9c0da0d to 6960dd5 Compare May 24, 2025 18:30
@nickva nickva force-pushed the run-test262-in-ci branch 2 times, most recently from ab51af9 to 7ca7dc7 Compare June 4, 2025 03:44
@nickva nickva force-pushed the run-test262-in-ci branch 2 times, most recently from 4a07bd7 to 44d52ea Compare June 14, 2025 05:39
nickva added a commit to apache/couchdb that referenced this pull request Jun 15, 2025
Test262 are 70k+ Javascript conformance tests [1].

QuickJS has its own test runner but unfortunately there is not automatic
bootstraping and they run by hand. There is an upstream PR [2] to add these
tests to run there but until that happens we can patch our own QuickJS with.

This particular commit doesn't run the tests just patches the necessary updates
for bootstrapping and some timeout tweaks to fix some flakes.

[1] https://github.com/tc39/test262
[2] bellard/quickjs#408
nickva added a commit to apache/couchdb that referenced this pull request Jun 15, 2025
Test262 are 70k+ Javascript conformance tests [1].

There is an upstream PR [2] to run these in CI there but until then
can patch our own QuickJS and run them in our CI.

One of the patches we have `04-test262-errors.patch` patches one of the
exception we expect to get since modified the parser to accept the `function`
expression syntax.

[1] https://github.com/tc39/test262
[2] bellard/quickjs#408
nickva added a commit to apache/couchdb that referenced this pull request Jun 15, 2025
Test262 are 70k+ Javascript conformance tests [1].

There is an upstream PR [2] to run these in CI there but until then
can patch our own QuickJS and run them in our CI.

One of the patches we have `04-test262-errors.patch` patches one of the
exception we expect to get since modified the parser to accept the `function`
expression syntax.

[1] https://github.com/tc39/test262
[2] bellard/quickjs#408
nickva added a commit to apache/couchdb that referenced this pull request Jun 15, 2025
Test262 are 70k+ Javascript conformance tests [1].

There is an upstream PR [2] to run these in CI there but until then
can patch our own QuickJS and run them in our CI.

One of the patches we have `04-test262-errors.patch` patches one of the
exception we expect to get since modified the parser to accept the `function`
expression syntax.

[1] https://github.com/tc39/test262
[2] bellard/quickjs#408
@nickva nickva force-pushed the run-test262-in-ci branch 2 times, most recently from 0ced3d2 to 17475ee Compare June 20, 2025 21:09
nickva added a commit to apache/couchdb that referenced this pull request Jun 20, 2025
Test262 are 70k+ Javascript conformance tests [1].

There is an upstream PR [2] to run these in CI there but until then we can
patch our own QuickJS and run them in our CI.

One of the patches we have `04-test262-errors.patch` patches one of the
exception we expect to get since modified the parser to accept the `function`
expression syntax.

[1] https://github.com/tc39/test262
[2] bellard/quickjs#408
nickva added a commit to apache/couchdb that referenced this pull request Jun 20, 2025
Test262 are 70k+ Javascript conformance tests [1].

There is an upstream PR [2] to run these in CI there but until then we can
patch our own QuickJS and run them in our CI.

One of the patches we have `04-test262-errors.patch` patches one of the
exception we expect to get since modified the parser to accept the `function`
expression syntax.

For now run the test in the full CI only for Linux and skip s390x. Some
architectures/os combinations show various discrepancies around TypedArrays or
rounding errors.

[1] https://github.com/tc39/test262
[2] bellard/quickjs#408
nickva added a commit to apache/couchdb that referenced this pull request Jun 21, 2025
Test262 are 70k+ Javascript conformance tests [1].

There is an upstream PR [2] to run these in CI there but until then we can
patch our own QuickJS and run them in our CI.

One of the patches we have `04-test262-errors.patch` patches one of the
exception we expect to get since modified the parser to accept the `function`
expression syntax.

For now run the test in the full CI only for Linux and skip s390x. Some
architectures/os combinations show various discrepancies around TypedArrays or
rounding errors.

[1] https://github.com/tc39/test262
[2] bellard/quickjs#408
nickva added a commit to apache/couchdb that referenced this pull request Jun 21, 2025
Test262 are 70k+ Javascript conformance tests [1].

There is an upstream PR [2] to run these in CI there but until then we can
patch our own QuickJS and run them in our CI.

One of the patches we have `04-test262-errors.patch` patches one of the
exception we expect to get since modified the parser to accept the `function`
expression syntax.

For now run the test in the full CI only for Linux and skip s390x. Some
architectures/os combinations show various discrepancies around TypedArrays or
rounding errors.

[1] https://github.com/tc39/test262
[2] bellard/quickjs#408
@nickva nickva force-pushed the run-test262-in-ci branch from 17475ee to 2b07a0b Compare June 29, 2025 18:35
Run test262 tests for Linux, macOS and Cosmopolitan

Add a Makefile `test2-bootstrap` helper to clone and patch test262 tests at
a particular commit. Running with the latest commit noticed a few tests were
failing and added them to the errors list.

Noticed a few flaky staging math tests (acosh and cbrt) and made a PR to
test262 to fix those.

The CI environment, especially for macOS, was a bit more unpredictable and was
failing in atomics tests due to lower timeouts in the `atomicsHelper` so double
the timeouts. The time didn't worsen too much. It still takes about 2-3 min.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant