Fix swarming tests not running in parallel
Due to recent Chrome infra changes in
https://chromium-review.googlesource.com/c/472290/
tests running on swarming are now assumed to emit JSON results
or will be marked as failing. This requires us to use our
gtest-parallel wrapper for all our Swarming tests
(or implement the --isolated-script-test-output flag, which
normally only is implemented by the Chromium test launcher).
The low_bandwidth_audio_test can actually run in parallel,
so just change that.
The webrtc_nonparallel_tests cannot, so this CL changes MB
to pass --workers=1 flag to gtest-parallel, which makes the
tests run in sequence. This adds a little confusion but the root
problem is really that our gtest-parallel script [1] does a lot more
than just running the tests in parallel these days, so it should
probably be renamed.
Also make sure gtest-parallel-wrapper.py [2] consumes the
--isolated-script-test-chartjson-output flag (unused) so we don't
pass it on to the test executable.
[1]: https://chromium.googlesource.com/external/github.com/google/gtest-parallel/+/master/gtest-parallel
[2]: https://chromium.googlesource.com/external/webrtc/+/master/tools-webrtc/gtest-parallel-wrapper.py
BUG=709988
TBR=ehmaldonado@webrtc.org
NOTRY=True
Review-Url: https://codereview.webrtc.org/2806373002
Cr-Commit-Position: refs/heads/master@{#17646}
diff --git a/tools-webrtc/mb/mb.py b/tools-webrtc/mb/mb.py
index 52c3987..7361e12 100755
--- a/tools-webrtc/mb/mb.py
+++ b/tools-webrtc/mb/mb.py
@@ -1087,9 +1087,7 @@
'--test',
]
- gtest_parallel = (test_type != 'non_parallel_console_test_launcher' and
- not memcheck)
- if gtest_parallel:
+ if not memcheck:
extra_files += [
'../../third_party/gtest-parallel/gtest-parallel',
'../../tools-webrtc/gtest-parallel-wrapper.py',
@@ -1111,17 +1109,19 @@
cmdline = (['../../testing/xvfb.py'] if xvfb else
['../../testing/test_env.py'])
- if memcheck:
- cmdline += memcheck_cmdline
- elif gtest_parallel:
- cmdline += gtest_parallel_wrapper
- cmdline += [
- executable,
+ cmdline += memcheck_cmdline if memcheck else gtest_parallel_wrapper
+ cmdline.append(executable)
+ if test_type == 'non_parallel_console_test_launcher' and not memcheck:
+ # Still use the gtest-parallel-wrapper.py script since we need it to
+ # run tests on swarming, but don't execute tests in parallel.
+ cmdline.append('--workers=1')
+
+ cmdline.extend([
'--',
'--asan=%d' % asan,
'--msan=%d' % msan,
'--tsan=%d' % tsan,
- ]
+ ])
cmdline += isolate_map[target].get('args', [])