Closed Bug 1638993 Opened 4 years ago Closed 4 years ago

Convert 'mach test-info' to run with Python 3

Categories

(Testing :: General, task, P2)

task

Tracking

(firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: KrisWright, Assigned: gbrown)

References

Details

Attachments

(1 file)

mach test-info 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

Currently this fails in moztest (TestResolver):

TypeError: '<' not supported between instances of 'dict' and 'dict'

  File "/home/gbrown/src/testing/mach_commands.py", line 698, in test_info_tests
    show_info, show_results, show_durations, show_tasks, show_bugs)
  File "/home/gbrown/src/testing/testinfo.py", line 462, in report
    self.set_test_name()
  File "/home/gbrown/src/testing/testinfo.py", line 163, in set_test_name
    tests = list(resolver.resolve_tests(paths=[relpath]))
  File "/home/gbrown/src/testing/mozbase/moztest/moztest/resolve.py", line 836, in resolve_tests
    for test in self._resolve(**kwargs):
  File "/home/gbrown/src/testing/mozbase/moztest/moztest/resolve.py", line 624, in _resolve
    if (path in self.test_dirs or
  File "/home/gbrown/src/testing/mozbase/moztest/moztest/resolve.py", line 543, in test_dirs
    for test in self.tests:
  File "/home/gbrown/src/testing/mozbase/moztest/moztest/resolve.py", line 513, in tests
    for test in self.load_tests():
  File "/home/gbrown/src/testing/mozbase/moztest/moztest/resolve.py", line 466, in __call__
    for test in tests:
  File "/home/gbrown/src/testing/mozbase/moztest/moztest/resolve.py", line 452, in _load_reftest_manifest
    for test in sorted(manifest.tests):
Depends on: 1428718
Assignee: nobody → gbrown
Severity: -- → N/A
Priority: -- → P2

With recent changes to dependencies, 'mach test-info' can now run under python 3.

Pushed by gbrown@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/be7a56eeccc3 Run 'mach test-info' with python 3; r=jmaher
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: