chromeos: Run all Tast tests via the host-side tast bin.

*except for coverage tests, since they need special setup.

This removes support for the '--use-host-tast-bin' arg, since we'll
now default to always using.

Bug: 923426
Change-Id: Ifb57f53153c4d4db73e98e98cce1ef9a49548679
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1585002
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#655245}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d33514e31c554ba8e861ad03ac6dc66d5a325cf2
This commit is contained in:
Ben Pastene 2019-04-30 16:05:42 +00:00 коммит произвёл Commit Bot
Родитель 6b30db5b15
Коммит 57ee4e3bef
1 изменённых файлов: 7 добавлений и 14 удалений

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

@ -223,9 +223,8 @@ class TastTest(RemoteTest):
self._suite_name = args.suite_name
self._tests = args.tests
self._conditional = args.conditional
self._use_host_tast = args.use_host_tast_bin
if self._use_host_tast and not self._logs_dir:
if not self._llvm_profile_var and not self._logs_dir:
# The host-side Tast bin returns 0 when tests fail, so we need to capture
# and parse its json results to reliably determine if tests fail.
raise TestFormatError(
@ -269,12 +268,10 @@ class TastTest(RemoteTest):
# Coverage tests require some special pre-test setup, so use an
# on_device_script in that case. For all other tests, use cros_run_test's
# built-in '--tast' option. This gives us much better results reporting.
# TODO(bpastene): s/True/self._llvm_profile_var/ once we parse Tast results.
if not self._use_host_tast:
if self._llvm_profile_var:
# Build the shell script that will be used on the device to invoke the
# test.
device_test_script_contents = self.BASIC_SHELL_SCRIPT[:]
if self._llvm_profile_var:
device_test_script_contents += [
'echo "LLVM_PROFILE_FILE=%s" >> /etc/chrome_dev.conf' % (
self._llvm_profile_var)
@ -324,7 +321,7 @@ class TastTest(RemoteTest):
def post_run(self, return_code):
# If we don't need to parse the host-side Tast tool's results, fall back to
# the parent method's default behavior.
if not self._use_host_tast:
if self._llvm_profile_var:
return super(TastTest, self).post_run(return_code)
tast_results_path = os.path.join(self._logs_dir, 'streamed_results.jsonl')
@ -794,10 +791,6 @@ def main():
tast_test_parser.add_argument(
'--test', '-t', action='append', dest='tests',
help='A Tast test to run in the device (eg: "ui.ChromeLogin").')
tast_test_parser.add_argument(
'--use-host-tast-bin', action='store_true',
help='Use the host-side Tast bin to run the tests instead of the '
'DUT-side local_test_runner. TODO(bpastene): Make this default.')
add_common_args(gtest_parser, tast_test_parser, host_cmd_parser)
args, unknown_args = parser.parse_known_args()