-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
8ee7286
to
24e9e37
Compare
9c0da0d
to
6960dd5
Compare
ab51af9
to
7ca7dc7
Compare
4a07bd7
to
44d52ea
Compare
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
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
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
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
0ced3d2
to
17475ee
Compare
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
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
2b07a0b
to
11325a5
Compare
8c30777
to
6f8b450
Compare
@bellard any interest in having the CI run test262 tests? I noticed you keep the test262 commit sha in the TODO file but I put it in the Makefile, not sure my approach is good. Maybe it could be a separate file? The idea is to have repeatability if the CI job is re-run and test262 is updated in the meantime. |
Your approach looks OK. I'll remove the test262 commit sha in TODO ASAP. |
6f8b450
to
3c38f29
Compare
Updated with latest test262 from yesterday (2025-09-14). Needed |
3c38f29
to
8b43bae
Compare
19d8e52
to
0df111b
Compare
submodules: true | ||
- name: Install gcc-multilib | ||
run: | | ||
sudo apt update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After ubuntu images receive an update for a about a day or two CI will start failing unless the CI jobs perform an apt update
so that's why I added it here.
More info at actions/runner-images#12599
A last issue before committing: test262 should be run for at least one 32 bit architecture such as Linux x86. |
9551827
to
959a180
Compare
you should update the test262 to fix the remaining issue. |
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. 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.
959a180
to
fb14cc6
Compare
Upstream merged test262 PR so drop patches related to that: bellard/quickjs#408 Other improvements * Add set methods (union, difference, intersection, ...) bellard/quickjs@a1e073e * Add iterators bellard/quickjs@982b7aa bellard/quickjs@e924173 bellard/quickjs@b2ed2e9 bellard/quickjs@cf0e179 bellard/quickjs@2d99c32 * Add ArrayBuffer.prototype.transfer bellard/quickjs@1e19893 * Add resizable array buffers bellard/quickjs@f021d77 * Add Map and WeakMap upsert bellard/quickjs@456e016 * Add Map.sumPrecise() bellard/quickjs@bc753c6 bellard/quickjs@c3e5ae2 * Fix date parsing bellard/quickjs@0060876
Upstream merged test262 PR so drop patches related to that: bellard/quickjs#408 Other improvements * Add set methods (union, difference, intersection, ...) bellard/quickjs@a1e073e * Add iterators bellard/quickjs@982b7aa bellard/quickjs@e924173 bellard/quickjs@b2ed2e9 bellard/quickjs@cf0e179 bellard/quickjs@2d99c32 * Add ArrayBuffer.prototype.transfer bellard/quickjs@1e19893 * Add resizable array buffers bellard/quickjs@f021d77 * Add Map and WeakMap upsert bellard/quickjs@456e016 * Add Map.sumPrecise() bellard/quickjs@bc753c6 bellard/quickjs@c3e5ae2 * Fix date parsing bellard/quickjs@0060876
Upstream merged test262 PR so drop patches related to that: bellard/quickjs#408 Other improvements * Add set methods (union, difference, intersection, ...) bellard/quickjs@a1e073e * Add iterators bellard/quickjs@982b7aa bellard/quickjs@e924173 bellard/quickjs@b2ed2e9 bellard/quickjs@cf0e179 bellard/quickjs@2d99c32 * Add ArrayBuffer.prototype.transfer bellard/quickjs@1e19893 * Add resizable array buffers bellard/quickjs@f021d77 * Add Map and WeakMap upsert bellard/quickjs@456e016 * Add Map.sumPrecise() bellard/quickjs@bc753c6 bellard/quickjs@c3e5ae2 * Fix date parsing bellard/quickjs@0060876
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.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.