-
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
Spidermonkey tests #156
Spidermonkey tests #156
Conversation
I copied /js/src/tests to into /source/spidermonkey-tests I removed /js/src/tests/Intl because it depends on the Intl object which is baked into the js engine. The version I copied was changeset 215929:2a3399e38768 from the Mozilla inbound repository. According to my understanding, this code is available under the Mozilla Public License, which allows including the code as part of a "Larger Work", such as Higgs. I copied /toolkit/content/license.html to /source/spidermonkey-tests/license.html.
Jesus, over 7000 files. The GitHub web interface took several seconds to load, woah. Thank you for doing this work. Can you explain what you did, what kind of results you got so far, what you learned about the way their tests work? There are way more tests than I realized. I'm expecting that lots of these tests will not pass. I was hoping that we could add the SpiderMonkey tests under tests/spidermonkey, and have the existing test runner run them, if possible. I'm thinking we can use your alternate test runner to identify the tests that work and those that don't. We can then open a bunch of issues for bugs found. My goal would be to begin slowly migrating/porting the working tests to the "normal" test-runner, so that they are always run when people do Nitpicks: it seems you use tabs in your source. We prefer spaces only, with tabs being 4 spaces wide. Some of the files included seem not relevant (Makefile.in, README.txt) |
I copied /js/src/tests to into /source/spidermonkey-tests Rewriting the test runner was interesting. I had to go spelunking through the very thorough and professional python build system and try and isolate what was relevant and what was not. The test runner I wrote is ugly and can be improved. I noticed that some of the tests require objects from other js files in parent directories (typically browser.js shell.js or jsref.js) which seem to mock out parts of the browser. Loading these files for the appropriate tests required splitting up the runTests function into three (poorly-named) functions which cherry-pick the right files and directories to test or include. If you get an error about a global variable which hasn't been seen before it's probably because one of these has not been properly loaded.
It's possible that the spidermonkey test runner is incomplete, but it seems to be working. Maybe I should write tests for it. |
Does it segfault on all the tests? Does anything pass? |
I tried a couple different files, they all seem to segfault at line 166 of |
Must be some bug in the JIT that gets triggered. Either by your test runner, or by some JS code that's getting loaded for all the tests. You can try commenting out or not loading specific bits of code to try and narrow down what's failing. I added a few bits of info about debugging on this wiki page: https://github.com/maximecb/Higgs/wiki/Debugging-Higgs |
I don't expect this to get merged in the first go, but it's a first stab.
To fix #75.