Bug 1638965 - Run 'mach gtest' in python 3; r=bc

Differential Revision: https://phabricator.services.mozilla.com/D77092
This commit is contained in:
Geoff Brown 2020-05-27 20:53:22 +00:00
parent 8d2dd3a46f
commit 21053c0624
3 changed files with 5 additions and 2 deletions

1
mach
View File

@ -24,7 +24,6 @@ py2commands="
geckodriver-test
geckoview-junit
gradle
gtest
hazards
jsapi-tests
jsshell-bench

View File

@ -112,7 +112,7 @@ class ProcessExecutionMixin(LoggingMixin):
if python_unbuffered:
use_env['PYTHONUNBUFFERED'] = '1'
self.log(logging.DEBUG, 'process', {'env': use_env}, 'Environment: {env}')
self.log(logging.DEBUG, 'process', {'env': str(use_env)}, 'Environment: {env}')
use_env = ensure_subprocess_env(use_env)
if pass_thru:

View File

@ -12,6 +12,7 @@ import glob
import os
import posixpath
import shutil
import six
import sys
import tempfile
import time
@ -102,6 +103,8 @@ class RemoteGTests(object):
if not os.path.isdir(f):
self.device.push(f, self.remote_profile)
if test_filter is not None:
test_filter = six.ensure_text(test_filter)
env = self.build_environment(shuffle, test_filter, enable_webrender)
args = ["-unittest", "--gtest_death_test_style=threadsafe",
"-profile %s" % self.remote_profile]
@ -301,6 +304,7 @@ class AppWaiter(object):
return False
if not new_content:
return False
new_content = six.ensure_text(new_content)
last_full_line_pos = new_content.rfind('\n')
if last_full_line_pos <= 0:
# wait for a full line