Pass test runner command-line flags to the binary also when listing tests

This allows to apply expectation filters
which are specific to the selected ANGLE backend.

Bug: 839893
Change-Id: Iafbb487e3eb5ef5400c8b478b350bafba38e0007
Reviewed-on: https://chromium-review.googlesource.com/1056034
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#558947}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2a8cafcc272f80a51144395e0de84ecc6abefaac
This commit is contained in:
Yuly Novikov 2018-05-16 02:59:29 +00:00 коммит произвёл Commit Bot
Родитель e3735a3af6
Коммит 03f39fd800
1 изменённых файлов: 9 добавлений и 1 удалений

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

@ -391,11 +391,19 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
retries = 1
if self._test_instance.wait_for_java_debugger:
timeout = None
flags = list(self._test_instance.flags)
flags.append('--gtest_list_tests')
# TODO(crbug.com/726880): Remove retries when no longer necessary.
for i in range(0, retries+1):
logging.info('flags:')
for f in flags:
logging.info(' %s', f)
raw_test_list = crash_handler.RetryOnSystemCrash(
lambda d: self._delegate.Run(
None, d, flags='--gtest_list_tests', timeout=timeout),
None, d, flags=' '.join(flags), timeout=timeout),
device=dev)
tests = gtest_test_instance.ParseGTestListTests(raw_test_list)
if not tests: