mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 899695 - Fix exception in "mach python" on Windows [r=gps]
DONTBUILD (not part of the build)
This commit is contained in:
parent
49f1fe3711
commit
ac0a131eac
3
mach
3
mach
@ -33,8 +33,7 @@ for dir_path in ancestors(os.getcwd()):
|
||||
# to look for a config file at the path in $MOZCONFIG rather than
|
||||
# its default locations.
|
||||
#
|
||||
# Note: subprocess requires native strings in os.environ Python
|
||||
# 2.7.2 and earlier on Windows.
|
||||
# Note: subprocess requires native strings in os.environ on Windows
|
||||
os.environ[b"MOZCONFIG"] = str(info["mozconfig"])
|
||||
|
||||
if "topsrcdir" in info:
|
||||
|
@ -59,7 +59,8 @@ class MachCommands(MachCommandBase):
|
||||
return self.run_process([self.python_executable] + args,
|
||||
pass_thru=True, # Allow user to run Python interactively.
|
||||
ensure_exit_code=False, # Don't throw on non-zero exit code.
|
||||
append_env={'PYTHONDONTWRITEBYTECODE': '1'})
|
||||
# Note: subprocess requires native strings in os.environ on Windows
|
||||
append_env={b'PYTHONDONTWRITEBYTECODE': str('1')})
|
||||
|
||||
@Command('python-test', category='testing',
|
||||
description='Run Python unit tests.')
|
||||
@ -109,7 +110,8 @@ class MachCommands(MachCommandBase):
|
||||
[self.python_executable, file],
|
||||
ensure_exit_code=False, # Don't throw on non-zero exit code.
|
||||
log_name='python-test',
|
||||
append_env={'PYTHONDONTWRITEBYTECODE': '1'},
|
||||
# subprocess requires native strings in os.environ on Windows
|
||||
append_env={b'PYTHONDONTWRITEBYTECODE': str('1')},
|
||||
line_handler=_line_handler)
|
||||
return_code += inner_return_code
|
||||
|
||||
|
@ -149,7 +149,6 @@ class MochitestRunner(MozbuildObject):
|
||||
return 1
|
||||
|
||||
options.testPath = test_path
|
||||
env = {'TEST_PATH': test_path}
|
||||
|
||||
if rerun_failures:
|
||||
options.testManifest = failure_file_path
|
||||
|
Loading…
Reference in New Issue
Block a user