mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 22:00:47 +01:00
Use gtest_parallel with 1 worker for webrtc_perf_tests.
This will enable test results to be uploaded to ResultDB. Bug: b/197492097 Change-Id: Iec28520c4cd8f35fcff2cbd105a4b851ef41b9fc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239641 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Christoffer Jansson <jansson@google.com> Commit-Queue: Jeremy Leconte <jleconte@google.com> Cr-Commit-Position: refs/heads/main@{#35458}
This commit is contained in:
parent
0763ccc8e3
commit
258ed1a38a
2 changed files with 34 additions and 25 deletions
|
@ -941,7 +941,6 @@ class MetaBuildWrapper(object):
|
||||||
else:
|
else:
|
||||||
cmdline += [vpython_exe, '../../testing/test_env.py']
|
cmdline += [vpython_exe, '../../testing/test_env.py']
|
||||||
|
|
||||||
if test_type != 'raw':
|
|
||||||
extra_files += [
|
extra_files += [
|
||||||
'../../third_party/gtest-parallel/gtest-parallel',
|
'../../third_party/gtest-parallel/gtest-parallel',
|
||||||
'../../third_party/gtest-parallel/gtest_parallel.py',
|
'../../third_party/gtest-parallel/gtest_parallel.py',
|
||||||
|
@ -956,18 +955,20 @@ class MetaBuildWrapper(object):
|
||||||
'--output_dir=%s' % output_dir,
|
'--output_dir=%s' % output_dir,
|
||||||
'--dump_json_test_results=%s' % test_results,
|
'--dump_json_test_results=%s' % test_results,
|
||||||
'--gtest_color=no',
|
'--gtest_color=no',
|
||||||
|
]
|
||||||
|
if test_type != 'raw':
|
||||||
# We tell gtest-parallel to interrupt the test after 900
|
# We tell gtest-parallel to interrupt the test after 900
|
||||||
# seconds, so it can exit cleanly and report results,
|
# seconds, so it can exit cleanly and report results,
|
||||||
# instead of being interrupted by swarming and not
|
# instead of being interrupted by swarming and not
|
||||||
# reporting anything.
|
# reporting anything.
|
||||||
'--timeout=%s' % timeout,
|
cmdline.append('--timeout=%s' % timeout)
|
||||||
]
|
must_retry = True
|
||||||
if test_type == 'non_parallel_console_test_launcher':
|
if (test_type == 'raw' or
|
||||||
|
test_type == 'non_parallel_console_test_launcher'):
|
||||||
# Still use the gtest-parallel-wrapper.py script since we
|
# Still use the gtest-parallel-wrapper.py script since we
|
||||||
# need it to run tests on swarming, but don't execute tests
|
# need it to run tests on swarming, but don't execute tests
|
||||||
# in parallel.
|
# in parallel.
|
||||||
cmdline.append('--workers=1')
|
cmdline.append('--workers=1')
|
||||||
must_retry = True
|
|
||||||
|
|
||||||
asan = 'is_asan=true' in vals['gn_args']
|
asan = 'is_asan=true' in vals['gn_args']
|
||||||
lsan = 'is_lsan=true' in vals['gn_args']
|
lsan = 'is_lsan=true' in vals['gn_args']
|
||||||
|
|
|
@ -489,7 +489,10 @@ class UnitTest(unittest.TestCase):
|
||||||
self.assertEqual(files, [
|
self.assertEqual(files, [
|
||||||
'../../.vpython',
|
'../../.vpython',
|
||||||
'../../testing/test_env.py',
|
'../../testing/test_env.py',
|
||||||
|
'../../third_party/gtest-parallel/gtest-parallel',
|
||||||
|
'../../third_party/gtest-parallel/gtest_parallel.py',
|
||||||
'../../tools_webrtc/flags_compatibility.py',
|
'../../tools_webrtc/flags_compatibility.py',
|
||||||
|
'../../tools_webrtc/gtest-parallel-wrapper.py',
|
||||||
'base_unittests',
|
'base_unittests',
|
||||||
])
|
])
|
||||||
self.assertEqual(command, [
|
self.assertEqual(command, [
|
||||||
|
@ -497,6 +500,11 @@ class UnitTest(unittest.TestCase):
|
||||||
'../../tools_webrtc/flags_compatibility.py',
|
'../../tools_webrtc/flags_compatibility.py',
|
||||||
'vpython',
|
'vpython',
|
||||||
'../../testing/test_env.py',
|
'../../testing/test_env.py',
|
||||||
|
'../../tools_webrtc/gtest-parallel-wrapper.py',
|
||||||
|
'--output_dir=${ISOLATED_OUTDIR}/test_logs',
|
||||||
|
'--dump_json_test_results=${ISOLATED_OUTDIR}/gtest_output.json',
|
||||||
|
'--gtest_color=no',
|
||||||
|
'--workers=1',
|
||||||
'./base_unittests',
|
'./base_unittests',
|
||||||
'--asan=0',
|
'--asan=0',
|
||||||
'--lsan=0',
|
'--lsan=0',
|
||||||
|
|
Loading…
Reference in a new issue