chromeos: Add a test runner arg that stops the UI on the device.
And enable it for some UI tests. Bug: 947531 Change-Id: I1545ce6f718214a65690cc6044e2398d9a0bc218 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1635350 Reviewed-by: John Budorick <jbudorick@chromium.org> Commit-Queue: Ben Pastene <bpastene@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#665248} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 4dad0e4bd5ea5659770c2e5c4e6b8d127a21c6a5
This commit is contained in:
Родитель
2a57b80f66
Коммит
ff7a641a07
|
@ -402,6 +402,7 @@ class GTestTest(RemoteTest):
|
|||
self._test_launcher_total_shards = args.test_launcher_total_shards
|
||||
|
||||
self._on_device_script = None
|
||||
self._stop_ui = args.stop_ui
|
||||
|
||||
@property
|
||||
def suite_name(self):
|
||||
|
@ -469,9 +470,7 @@ class GTestTest(RemoteTest):
|
|||
if self._additional_args:
|
||||
test_invocation += ' %s' % ' '.join(self._additional_args)
|
||||
|
||||
if self._test_exe == 'interactive_ui_tests':
|
||||
# interactive_ui_tests needs some special setup. See crbug.com/946685#c4
|
||||
# TODO(bpastene): Put all this behind a flag if more suites need it.
|
||||
if self._stop_ui:
|
||||
device_test_script_contents += [
|
||||
'stop ui',
|
||||
]
|
||||
|
@ -772,6 +771,9 @@ def main():
|
|||
'--test-launcher-total-shards',
|
||||
type=int, default=os.environ.get('GTEST_TOTAL_SHARDS', 1),
|
||||
help='Total number of external shards.')
|
||||
gtest_parser.add_argument(
|
||||
'--stop-ui', action='store_true',
|
||||
help='Will stop the UI service in the device before running the test.')
|
||||
|
||||
# Tast test args.
|
||||
# pylint: disable=line-too-long
|
||||
|
|
Загрузка…
Ссылка в новой задаче