Convert the JS tests suites to Python 3.
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
People
(Reporter: nbp, Assigned: jgraham)
References
Details
Attachments
(1 file, 1 obsolete file)
12.39 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
As mach forced us to move to Python 3, I am not longer able to run any tests / jit-tests which still requires python 2.7 to run. Converting the tests / jit-tests harness to python 3 should solve this issue.
Reporter | ||
Comment 1•6 years ago
|
||
This patch changes add decoding of bytes strings into strings, and uses io.open instead of the open builtin such that this code can be used both with Python 2.7 and Python 3. Note, I had to make the code compatible with Python 2.7 because I do not know how to run python 3 from mach_commands.py testing commands.
Comment 2•6 years ago
|
||
Comment on attachment 8982548 [details] [diff] [review] Convert JS tests suites to Python 3. Review of attachment 8982548 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/tests/lib/tests.py @@ +59,5 @@ > return kwargs['none'] > return JITFLAGS[variant] > > def valid_jitflags(): > + return [ x for x in JITFLAGS.keys() ] `list(JITFLAGS.keys())` will likely work as well.
Reporter | ||
Comment 3•6 years ago
|
||
(In reply to :Ms2ger (⌚ UTC+1/+2) from comment #2) > ::: js/src/tests/lib/tests.py > > def valid_jitflags(): > > + return [ x for x in JITFLAGS.keys() ] > > `list(JITFLAGS.keys())` will likely work as well. Tested locally, works with both Python 3.5 and 2.7.
Comment 4•6 years ago
|
||
Comment on attachment 8982548 [details] [diff] [review] Convert JS tests suites to Python 3. Review of attachment 8982548 [details] [diff] [review]: ----------------------------------------------------------------- lgtm. The Queue case thing is kind of crazy. Thank you!
Reporter | ||
Comment 5•6 years ago
|
||
One last thing reported by Try on Windows: sys.maxint --> sys.maxsize, which should also work as expected on both python 2 and 3. https://treeherder.mozilla.org/#/jobs?repo=try&revision=2f729e22888574313f2a5a0e1764a559e97dd538
Reporter | ||
Comment 6•6 years ago
|
||
The attached patch is no longer sufficient, since the ref test test suite now depends on a HUGE amount of python code which would have to be converted as well. Giving up on this task for the moment.
Reporter | ||
Updated•6 years ago
|
Comment 7•5 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:nbp, could you have a look please?
Reporter | ||
Comment 8•5 years ago
|
||
(In reply to Release mgmt bot [:sylvestre / :calixte] from comment #7)
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:nbp, could you have a look please?
See comment 6.
Someone else added a new dependency preventing this simple patch from applying. Therefore dropping the ownership of this bug. If someone else want to continue from my patch, then are free to do so, but I am not giving more time to this issue.
Comment 9•5 years ago
|
||
Depends on D32485
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment hidden (off-topic) |
Comment 11•2 years ago
|
||
It looks like this ended up happening mostly in bug 1619475. There may be something left in this patch that's still useful, but given that we're running the tests under python3 all the time now, it would be minor.
Updated•2 years ago
|
Updated•2 years ago
|
Description
•