Closed Bug 1793668 Opened 3 years ago Closed 1 years ago

test262-update.py script --local argument doesn't work in python 3

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: tjc, Assigned: Ms2ger)

References

(Blocks 3 open bugs)

Details

Attachments

(2 files)

Running this command:

python3 test262-update.py --local=$HOME/test262 --branch=change-array-by-copy

I got the error:

Traceback (most recent call last):
  File "/home/tjc/gecko-fork/js/src/tests/test262-update.py", line 900, in <module>
    args.func(args)
  File "/home/tjc/gecko-fork/js/src/tests/test262-update.py", line 837, in update_test262
    return fetch_local_changes(inDir, outDir, srcDir, strictTests)
  File "/home/tjc/gecko-fork/js/src/tests/test262-update.py", line 585, in fetch_local_changes
    ).split("\n")[0]
TypeError: a bytes-like object is required, not 'str'

The script worked when I replaced python3 with python2. If the intention is that this script requires python2, that should be documented.

$ python3 --version
Python 3.10.6
$ python2 --version
Python 2.7.18
Blocks: test262
Blocks: sm-meta
Severity: -- → N/A
Type: defect → enhancement
Priority: -- → P3
Blocks: goodbye-py2

It seems like it's the --local flag in particular that's causing trouble. This also breaks the integration test in js/src/tests/test/run.py; I'm disabling the test in bug 1891746 with a pointer here.

Summary: test262-update.py script requires Python 2 → test262-update.py script --local argument doesn't work in python 3
Assignee: nobody → Ms2ger
No longer blocks: sm-meta
Pushed by Ms2ger@gmail.com: https://hg.mozilla.org/integration/autoland/rev/56d2d09c8d54 fix test262-update.py --local in python 3; r=spidermonkey-reviewers,dminor https://hg.mozilla.org/integration/autoland/rev/c8793cd3262e Update test for test262-import.py; r=dminor
Status: NEW → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: