[Android] Log uncaught Java exceptions when running native tests.
Currently, Java exceptions hit while running native tests -- e.g. on JNI link failure -- are lost to the logcat. This surfaces them to the test runner's stdout. BUG= Review-Url: https://codereview.chromium.org/1982493002 Cr-Original-Commit-Position: refs/heads/master@{#393921} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 6cdb933c8d2c4cadbf842fbb3ceb9cecd0f70920
This commit is contained in:
Родитель
600754dd9e
Коммит
8186a18548
|
@ -4,6 +4,7 @@
|
|||
|
||||
import collections
|
||||
import itertools
|
||||
import logging
|
||||
import os
|
||||
import posixpath
|
||||
|
||||
|
@ -311,9 +312,13 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
|
|||
@local_device_test_run.handle_shard_failures_with(
|
||||
on_failure=self._env.BlacklistDevice)
|
||||
def list_tests(dev):
|
||||
tests = self._delegate.Run(
|
||||
raw_test_list = self._delegate.Run(
|
||||
None, dev, flags='--gtest_list_tests', timeout=30)
|
||||
tests = gtest_test_instance.ParseGTestListTests(tests)
|
||||
tests = gtest_test_instance.ParseGTestListTests(raw_test_list)
|
||||
if not tests:
|
||||
logging.info('No tests found. Output:')
|
||||
for l in raw_test_list:
|
||||
logging.info(' %s', l)
|
||||
tests = self._test_instance.FilterTests(tests)
|
||||
return tests
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче