Closed Bug 1638972 Opened 5 years ago Closed 4 years ago

Convert 'mach jstests' to run with Python 3

Categories

(Testing :: General, task, P3)

task

Tracking

(firefox78 affected)

RESOLVED DUPLICATE of bug 1691923
mozilla78
Tracking Status
firefox78 --- affected

People

(Reporter: KrisWright, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

mach jstests still runs with python 2 [1]. We want to convert all mach commands to python 3.

To do this, any dependencies of the command may need to be converted as well as the command itself.

[1] https://searchfox.org/mozilla-central/rev/9193635dca8cfdcb68f114306194ffc860456044/testing/mach_commands.py

Assignee: nobody → bob
Status: NEW → ASSIGNED

Enabling jstests to run with python3 hits

$ ./mach jstests --this-chunk 1 --total-chunks 100
Traceback (most recent call last):
  File "/home/bclary/mozilla/builds/autoland/mozilla/js/src/tests/jstests.py", line 676, in <module>
    sys.exit(main())
  File "/home/bclary/mozilla/builds/autoland/mozilla/js/src/tests/jstests.py", line 565, in main
    test_count, test_gen = load_tests(options, requested_paths, excluded_paths)
  File "/home/bclary/mozilla/builds/autoland/mozilla/js/src/tests/jstests.py", line 484, in load_tests
    wpt_tests = load_wpt_tests(xul_tester,
  File "/home/bclary/mozilla/builds/autoland/mozilla/js/src/tests/jstests.py", line 381, in load_wpt_tests
    test_manifests = manifestupdate.run(repo_root, manifest_root, logger,
  File "/home/bclary/mozilla/builds/autoland/mozilla/testing/web-platform/manifestupdate.py", line 120, in run
    manifests = load_and_update(logger, src_wpt_dir, test_paths,
  File "/home/bclary/mozilla/builds/autoland/mozilla/testing/web-platform/manifestupdate.py", line 186, in load_and_update
    m = manifest.manifest.load_and_update(paths["tests_path"],
  File "/home/bclary/mozilla/builds/autoland/mozilla/testing/web-platform/tests/tools/manifest/manifest.py", line 387, in load_and_update
    tree = vcs.get_tree(tests_root, manifest, manifest_path, cache_root,
  File "/home/bclary/mozilla/builds/autoland/mozilla/testing/web-platform/tests/tools/manifest/vcs.py", line 47, in get_tree
    tree = FileSystem(tests_root,
  File "/home/bclary/mozilla/builds/autoland/mozilla/testing/web-platform/tests/tools/manifest/vcs.py", line 103, in __init__
    self.ignore_cache = GitIgnoreCache(cache_path, root, rebuild)
  File "/home/bclary/mozilla/builds/autoland/mozilla/testing/web-platform/tests/tools/manifest/vcs.py", line 140, in __init__
    self.data = self.load(rebuild)
  File "/home/bclary/mozilla/builds/autoland/mozilla/testing/web-platform/tests/tools/manifest/vcs.py", line 164, in load
    data = self.check_valid(data)
  File "/home/bclary/mozilla/builds/autoland/mozilla/testing/web-platform/tests/tools/manifest/vcs.py", line 229, in check_valid
    ignore_path = os.path.join(self.tests_root, b".gitignore")
  File "/home/bclary/mozilla/builds/autoland/mozilla/firefox-opt/_virtualenvs/init_py3/lib64/python3.8/posixpath.py", line 90, in join
    genericpath._check_arg_types('join', a, *p)
  File "/home/bclary/mozilla/builds/autoland/mozilla/firefox-opt/_virtualenvs/init_py3/lib64/python3.8/genericpath.py", line 155, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components

which is the same issue as bug 1637915.

Depends on: 1637915
Pushed by bclary@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d8a7c3cb03ce enable mach jstests to run with Python 3. r=gbrown
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78

I am going to revert the change to mach due to multiple issues with android.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Pushed by bclary@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/048ef8ffb41e mark mach jstestbrowser, mach jstests as Python 2 only again. r=gbrown

I'm un-assigning myself until the time where we have more of the underlying infrastructure ported to support python3.

Assignee: bob → nobody
Severity: -- → S3
Priority: -- → P3

Sorry, duped 1665436 here by accident, and somehow added the correct dupe to it in addition to this one (rather than replacing this one). Just to clarify, it is, in fact, not a dupe of this bug :).

Status: REOPENED → RESOLVED
Closed: 5 years ago4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: