Comments (7)
FWIW, @ccxvii wrote an initial harness, and I extended it a bit to skip tests which hang/fail (with current master - 643d428 - about 25 tests).
The harness is not necessarily complete, and it's possible that some harness functions are missing and causing some failures. But it does manage to run all tests without hanging.
The harness and its current output (on Ubuntu 18.04 LTS) are attached here for reference:
mujs-test262-harness-and-output.zip
To run it:
clone https://github.com/tc39/test262.git && cd test262
git checkout es5-tests
# Save the attached harness as mujs-harness.js
# And actually run it
find test/suite -name '*.js' | mujs mujs-harness.js
Summary:
Total: 11701
Pass: 7275
Failed: 4426
from mujs.
The test suite here https://github.com/tc39/test262 tests a different language than MuJS implements. MuJS only implements ES5 but that test suite tests ES2015+.
from mujs.
@ccxvii Is it possible to checkout ECMA5.1 from tc39/test262 to get test suite ECMA5.1?
from mujs.
You can check it out from the 'es5' branch, but you'll need to write a new test harness. The one in the tc32/test262 suite assumes it will be run from inside a browser.
from mujs.
I think it'd be nice if this repo had such "test frame". Maybe just a small program which exposes window
as the global object and maybe few more bits that the test suits expects to see, and therefore allow it to run?
from mujs.
I did continue to improve the harness after I posted it here, but eventually stopped because it didn't seem like upstream intends to integrate it into the repo.
For reference, that's the latest patchset I had locally - https://gist.github.com/avih/d4765c2d39d487737134682dbb08cf70
It was applied on top of mujs dcb3f03 (after 1.0.4 and before 1.0.5).
The first commit is probably conflicting because upstream did add a compile function to the mujs shell - but I don't recall if it has identical API as the first commit here.
The 3 other commits should apply cleanly but I didn't test if they still work (with current mujs sh compile function and/or other changes).
The main difference from the harness I posted earlier is that this patchset adds a shell script to run each test on its own, because some tests leave the js VM dirty enough to affect the later tests.
Beyond the shell script, the js test harness file itself was also enhanced to identify/support more test descriptions/errors/etc.
I still think it would be nice to integrate and maintain a test 262 launcher at the repo, but I won't work on it myself as long as upstream seem uninterested.
from mujs.
I did continue to improve the harness after I posted it here, but eventually stopped because it didn't seem like upstream intends to integrate it into the repo.
For reference, that's the latest patchset
Ah, it's actually identical to the PR I opened 2018 - #73 and which is still open...
I just tested it again, and indeed except for the first commit which is no longer required because it was merged upstream (support compile
function at mujs shell), the three other commits are still valid, they still run the test suite.
Results with mujs master are pretty similar to what they were at 2018, with 5 less hanging tests which can be removed from the list of crashing/hanging tests. Still ~2K failures out of ~11K tests.
from mujs.
Related Issues (20)
- multi-thread environment HOT 4
- BUG HOT 2
- Does not build on macOS
- Warnings
- Get rid of setjmp HOT 1
- Object.keys([2,3]) returns [] instead of ["0", "1"] HOT 2
- String.prototype.replace() with global regex doesn't resolve correctly $`
- A performance issue caused by loop. HOT 2
- Suggestion - macro to make multi-threaded calls single-threaded
- The shared library should be built with SONAME
- Incorrect linker flag to build shared-lib on darwin
- Calling the join function on a self-referential array leads to a stack overflow.
- Unable to assign the eval function to a variable. Error: invalid use of 'eval'
- SyntaxError caused by the trailing comma in the function parameters. HOT 4
- Is it possible to increase the default stack size? HOT 19
- mujs github slug available
- The length of multi-code point Unicode characters is incorrect. HOT 9
- Unversioned shared library HOT 1
- MuJS compiling JS into a file opcode HOT 1
- Object.keys and Object.getOwnPropertyNames on Array returns indices twice HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mujs.