Closed
Bug 1638965
Opened 5 years ago
Closed 5 years ago
Convert 'mach gtest' to run with Python 3
Categories
(Testing :: General, task, P3)
Testing
General
Tracking
(firefox78 fixed)
RESOLVED
FIXED
mozilla78
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: KrisWright, Assigned: gbrown)
References
Details
Attachments
(1 file)
mach gtest
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.
Updated•5 years ago
|
Updated•5 years ago
|
![]() |
Assignee | |
Updated•5 years ago
|
Assignee: nobody → gbrown
Severity: -- → S3
Priority: -- → P3
![]() |
Assignee | |
Comment 1•5 years ago
|
||
On desktop, 'mach gtest' seems to work, but reports non-fatal errors:
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
msg = self.format(record)
File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
return fmt.format(record)
File "/home/gbrown/src/python/mach/mach/logging.py", line 67, in format
return json.dumps([record.created, action, params])
File "/usr/lib/python3.6/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
TypeError: keys must be a string
Call stack:
File "./mach", line 232, in <module>
main(sys.argv[1:])
File "./mach", line 228, in main
sys.exit(mach.run(args))
File "/home/gbrown/src/python/mach/mach/main.py", line 360, in run
return self._run(argv)
File "/home/gbrown/src/python/mach/mach/main.py", line 475, in _run
**vars(args.command_args))
File "/home/gbrown/src/python/mach/mach/registrar.py", line 109, in _run_command_handler
result = fn(**kwargs)
File "/home/gbrown/src/python/mozbuild/mozbuild/mach_commands.py", line 565, in gtest
pass_thru=True)
File "/home/gbrown/src/python/mach/mach/mixin/process.py", line 115, in run_process
self.log(logging.DEBUG, 'process', {'env': use_env}, 'Environment: {env}')
File "/home/gbrown/src/python/mach/mach/mixin/logging.py", line 54, in log
extra={'action': action, 'params': params})
Message: 'Environment: {env}'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
msg = self.format(record)
File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
return fmt.format(record)
File "/home/gbrown/src/python/mach/mach/logging.py", line 67, in format
return json.dumps([record.created, action, params])
File "/usr/lib/python3.6/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
TypeError: keys must be a string
Call stack:
File "./mach", line 232, in <module>
main(sys.argv[1:])
File "./mach", line 228, in main
sys.exit(mach.run(args))
File "/home/gbrown/src/python/mach/mach/main.py", line 360, in run
return self._run(argv)
File "/home/gbrown/src/python/mach/mach/main.py", line 475, in _run
**vars(args.command_args))
File "/home/gbrown/src/python/mach/mach/registrar.py", line 109, in _run_command_handler
result = fn(**kwargs)
File "/home/gbrown/src/python/mozbuild/mozbuild/mach_commands.py", line 565, in gtest
pass_thru=True)
File "/home/gbrown/src/python/mach/mach/mixin/process.py", line 115, in run_process
self.log(logging.DEBUG, 'process', {'env': use_env}, 'Environment: {env}')
File "/home/gbrown/src/python/mach/mach/mixin/logging.py", line 54, in log
extra={'action': action, 'params': params})
Message: 'Environment: {env}'
Arguments: ()
![]() |
Assignee | |
Comment 2•5 years ago
|
||
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb9093694c0a
Run 'mach gtest' in python 3; r=bc
Comment 4•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox78:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in
before you can comment on or make changes to this bug.
Description
•