Bug 899695 - Fix exception in "mach python" on Windows [r=gps]

DONTBUILD (not part of the build)
This commit is contained in:
Matt Brubeck 2013-08-08 08:06:02 -07:00
parent f524a73c0d
commit 93e36046ad
3 changed files with 5 additions and 5 deletions

3
mach
View File

@ -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:

View File

@ -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

View File

@ -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