Don't display colors on gtest-parallel logs on swarming.
It makes the logs hard to read, and swarming doesn't output colors anyway. Also: - Fix a bug where we tried to access output_dir when combining the logs even if the flag was not set. - Update a comment explaining why we just 'eat' the --isolated-script-test-chartjson-output flag. NOTRY=True BUG=webrtc:7524 Review-Url: https://codereview.webrtc.org/2843263005 Cr-Commit-Position: refs/heads/master@{#17973}
This commit is contained in:
@ -61,10 +61,15 @@ def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--isolated-script-test-output', type=str, default=None)
|
||||
|
||||
# TODO(ehmaldonado): Implement this flag instead of just "eating" it.
|
||||
# We don't need to implement this flag, and possibly can't, since it's
|
||||
# intended for results of Telemetry tests. See
|
||||
# https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/HEAD/dashboard/docs/data-format.md
|
||||
parser.add_argument('--isolated-script-test-chartjson-output', type=str,
|
||||
default=None)
|
||||
|
||||
# TODO(ehmaldonado): Figure out a way to avoid duplicating the flags in
|
||||
# gtest-parallel.
|
||||
parser.add_argument('--gtest_color', type=str, default='auto')
|
||||
parser.add_argument('--output_dir', type=str, default=None)
|
||||
parser.add_argument('--timeout', type=int, default=None)
|
||||
|
||||
@ -89,6 +94,8 @@ def main():
|
||||
gtest_total_shards,
|
||||
'--shard_index',
|
||||
gtest_shard_index,
|
||||
'--gtest_color',
|
||||
options.gtest_color,
|
||||
]
|
||||
|
||||
# --isolated-script-test-output is used to upload results to the flakiness
|
||||
@ -122,6 +129,7 @@ def main():
|
||||
|
||||
exit_code = subprocess.call(command, env=test_env, cwd=os.getcwd())
|
||||
|
||||
if options.output_dir:
|
||||
for test_status in 'passed', 'failed', 'interrupted':
|
||||
logs_dir = os.path.join(options.output_dir, test_status)
|
||||
if not os.path.isdir(logs_dir):
|
||||
|
||||
@ -1096,6 +1096,7 @@ class MetaBuildWrapper(object):
|
||||
output_dir = '${ISOLATED_OUTDIR}' + sep + 'test_logs'
|
||||
gtest_parallel_wrapper = [
|
||||
'../../tools-webrtc/gtest-parallel-wrapper.py',
|
||||
'--gtest_color=no',
|
||||
'--output_dir=%s' % output_dir,
|
||||
]
|
||||
|
||||
|
||||
@ -448,6 +448,7 @@ class UnitTest(unittest.TestCase):
|
||||
self.assertEqual(command, [
|
||||
'../../testing/test_env.py',
|
||||
'../../tools-webrtc/gtest-parallel-wrapper.py',
|
||||
'--gtest_color=no',
|
||||
'--output_dir=${ISOLATED_OUTDIR}/test_logs',
|
||||
'./base_unittests',
|
||||
'--workers=1',
|
||||
@ -493,6 +494,7 @@ class UnitTest(unittest.TestCase):
|
||||
self.assertEqual(command, [
|
||||
'../../testing/xvfb.py',
|
||||
'../../tools-webrtc/gtest-parallel-wrapper.py',
|
||||
'--gtest_color=no',
|
||||
'--output_dir=${ISOLATED_OUTDIR}/test_logs',
|
||||
'./base_unittests',
|
||||
'--',
|
||||
@ -538,6 +540,7 @@ class UnitTest(unittest.TestCase):
|
||||
self.assertEqual(command, [
|
||||
'../../testing/test_env.py',
|
||||
'../../tools-webrtc/gtest-parallel-wrapper.py',
|
||||
'--gtest_color=no',
|
||||
'--output_dir=${ISOLATED_OUTDIR}\\test_logs',
|
||||
r'.\unittests.exe',
|
||||
'--',
|
||||
@ -579,6 +582,7 @@ class UnitTest(unittest.TestCase):
|
||||
self.assertEqual(command, [
|
||||
'../../testing/test_env.py',
|
||||
'../../tools-webrtc/gtest-parallel-wrapper.py',
|
||||
'--gtest_color=no',
|
||||
'--output_dir=${ISOLATED_OUTDIR}/test_logs',
|
||||
'./base_unittests',
|
||||
'--',
|
||||
|
||||
Reference in New Issue
Block a user