Closed Bug 1603634 Opened 6 years ago Closed 6 years ago

[mozharness] fix tests for python3

Categories

(Release Engineering :: Applications: MozharnessCore, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: egao, Assigned: egao)

References

Details

(Keywords: leave-open)

Attachments

(7 files)

A lot of the issues when mozharness tests are run in python3, are the tests themselves.

For example, in test_base_config.py, the method _get_python_config() calls execfile, which is no longer supported in python3.

The only work required in this case is to wrap this in a if six.PY2 conditional and implement python2/3 cases.

This bug is to document the ongoing work to fix the tests themselves. Work requiring changes to the actual mozharness code should go under its own bugs that block the parent bug 1532427.

Assignee: nobody → egao
Keywords: leave-open
Summary: [mozharness] fix tests → [mozharness] fix tests for python3
Attachment #9115655 - Attachment description: Bug 1603634 - replace execfile syntax for python3 in test_base_config.py → Bug 1603634 - replace execfile syntax with python2/3 compatible call in test_base_config.py
Pushed by egao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8b75773bd695 wrap dictionary.keys() call with list() to ensure sortability r=aki
Pushed by egao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cd8323891d68 replace execfile syntax with python2/3 compatible call in test_base_config.py r=aki
Pushed by egao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0080453fdf41 change to integer division operator for both python versions r=aki
Pushed by egao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bc8ac1530aba replace file() call with open() in test_base_python.py r=aki
Attachment #9115926 - Attachment description: Bug 1603634 - ensure output being processed in mozharness/base/log.py is string type → Bug 1603634 - add check against byte types in mozharness/base/log.py
Pushed by egao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3bbca9c01ba3 check if line is a decodable type r=aki,marco
Attachment #9115926 - Attachment description: Bug 1603634 - add check against byte types in mozharness/base/log.py → Bug 1603634 - ensure iterated value is a list and only perform decode if value supports such action in mozharness/base/log.py
Pushed by egao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a2b49a6d061b ensure iterated value is a list and only perform decode if value supports such action in mozharness/base/log.py r=aki,marco
Attachment #9117708 - Attachment description: Bug 1603634 - use python3.6 in the lint docker image for mozharness tests in python3 → Bug 1603634 - use python3.6 to run mozharness tests in python3
Pushed by egao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e9830f213c8 use python3.6 to run mozharness tests in python3 r=jmaher
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: