Bug 1638954 - Run 'mach cppunittest' with python 3; r=bc

Differential Revision: https://phabricator.services.mozilla.com/D77258
This commit is contained in:
Geoff Brown 2020-05-28 14:45:50 +00:00
Родитель 9c32261cd8
Коммит da55c8ff29
3 изменённых файлов: 5 добавлений и 4 удалений

1
mach
Просмотреть файл

@ -16,7 +16,6 @@ py2commands="
browsertime
check-spidermonkey
clang-format
cppunittest
cramtest
devtools-css-db
firefox-ui-functional

Просмотреть файл

@ -86,7 +86,7 @@ class RemoteCPPUnitTests(cppunittests.CPPUnitTests):
for root, dirs, paths in os.walk(local_arm_lib):
for path in paths:
if path.endswith(".so"):
print("Pushing %s..".format(path), file=sys.stderr)
print("Pushing {}..".format(path), file=sys.stderr)
remote_file = posixpath.join(
self.remote_bin_dir, path)
local_file = os.path.join(root, path)

Просмотреть файл

@ -51,13 +51,15 @@ class CPPUnitTests(object):
proc = mozprocess.ProcessHandler([prog],
cwd=tempdir,
env=env,
storeOutput=False)
storeOutput=False,
universal_newlines=True)
else:
proc = mozprocess.ProcessHandler([prog],
cwd=tempdir,
env=env,
storeOutput=True,
processOutputLine=lambda _: None)
processOutputLine=lambda _: None,
universal_newlines=True)
# TODO: After bug 811320 is fixed, don't let .run() kill the process,
# instead use a timeout in .wait() and then kill to get a stack.
test_timeout = CPPUnitTests.TEST_PROC_TIMEOUT * timeout_factor