-
Notifications
You must be signed in to change notification settings - Fork 63
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
Port Mozilla tests to Higgs #75
Comments
As an example test: tests/test262/ch12/12.1/12.1-1.js Also, do you have any more guidance on which tests to import, or do you want basically all tests? |
I was hoping we could create a tests/test262 or tests/mozilla directory and place the tests in there. The number, 06, is because our test runner runs tests in alphabetical order. I tried to sort them from simplest or most fundamental to most complex. The test lib is automatically included by the test runner. So we could implement extra testing functions needed for mozilla compatibility in there. We'll probably need to do some hand-picking of tests. There are JS features Higgs doesn't support. What I'm hoping is that by adding these tests, we can discover fixable gaps in our JS support. |
I'm working on this (I'm muricula on irc). |
Hello again! The test suite you are interested in is called test262 (named after some committee or something). It can be found on Github: https://github.com/tc39/test262. Running it is as easy as: |
Can you try running it and tell us what results you get? Does it work out of the box at all? |
Some of the tests pass and some do not, I haven't let it run for the full time yet because I'm impatient. I'm trying to get them to run on Travis CI, but the build may time out, we'll see. |
The travis tests are running on my fork, if you're curious: |
Seems a lot of them are failing due to missing libraries. See "undefined base" errors. Would be worth establishing what causes that. |
So the build has stalled, perhaps while running test |
I don't think we necessarily need to run this on Travis. The point would be to get the tests to run once and maybe spot some more or less trivial bugs. Then we can open issues for those, create tests of our own and add them to our own test suite. Right now, something is clearly preventing the tests from even running properly. Likely a missing dependency. |
Mozilla have a large base of tests cases for their SunSpider JS engine, see:
http://hg.mozilla.org/mozilla-central/file/d812f80a0f1d/js/src/tests
We would like to port these tests to work with our own test framework (test-runner.js, which is executed with the
make test
command). This will require cherry-picking tests which are currently applicable to Higgs as some of these will use features which we do not yet support. It will also require changing parts of the tests to use our own test library (lib/test.js) instead of their own idiosyncratic assertion functions.Each ported test should ideally be a standalone JS file which can be run by Higgs directly from the console (e.g.: ./higgs tests/mozilla/mytest.js). The ported tests should go under source/tests/mozilla. New issues should be opened for the tests that currently fail under Higgs.
Note that it's important to include the license files associated with the tests that get ported.
The text was updated successfully, but these errors were encountered: