chromeos: Only fetch the system logs we care about during device tests.
Instead of pulling all of /var/log/ from the device after tests, this will pull only logs we realistically care about. This will help prevent us from pulling massive files like: https://chrome-isolated.appspot.com/browse?namespace=default-gzip&digest=feb62a5316e66179b97b2e422e49ded65dd77ccb&as=system.journal Bug: 1018990 Change-Id: Ie9e901ee921bc8c45ae78f493776cecf0d2fd21e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891131 Reviewed-by: John Budorick <jbudorick@chromium.org> Commit-Queue: Ben Pastene <bpastene@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#711729} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: d1f290fdb4c81cca3759eace00cad711ce505bbc
This commit is contained in:
Родитель
a03fd940a8
Коммит
845c454b4b
|
@ -50,6 +50,12 @@ SANITY_TEST_TARGET = 'cros_browser_sanity_test'
|
|||
# depending on which lab machine you're on.
|
||||
LAB_DUT_HOSTNAME = 'variable_chromeos_device_hostname'
|
||||
|
||||
SYSTEM_LOG_LOCATIONS = [
|
||||
'/var/log/chrome/',
|
||||
'/var/log/messages',
|
||||
'/var/log/ui/',
|
||||
]
|
||||
|
||||
TAST_DEBUG_DOC = 'https://bit.ly/2LgvIXz'
|
||||
|
||||
|
||||
|
@ -105,10 +111,9 @@ class RemoteTest(object):
|
|||
'--device', args.device if args.device else LAB_DUT_HOSTNAME
|
||||
]
|
||||
if args.logs_dir:
|
||||
self._test_cmd += [
|
||||
'--results-src', '/var/log/',
|
||||
'--results-dest-dir', args.logs_dir,
|
||||
]
|
||||
for log in SYSTEM_LOG_LOCATIONS:
|
||||
self._test_cmd += ['--results-src', log]
|
||||
self._test_cmd += ['--results-dest-dir', args.logs_dir]
|
||||
|
||||
# This environment variable is set for tests that have been instrumented
|
||||
# for code coverage. Its incoming value is expected to be a location
|
||||
|
@ -642,10 +647,9 @@ def host_cmd(args, unknown_args):
|
|||
cros_run_test_cmd.append('--debug')
|
||||
|
||||
if args.logs_dir:
|
||||
cros_run_test_cmd += [
|
||||
'--results-src', '/var/log/',
|
||||
'--results-dest-dir', args.logs_dir,
|
||||
]
|
||||
for log in SYSTEM_LOG_LOCATIONS:
|
||||
cros_run_test_cmd += ['--results-src', log]
|
||||
cros_run_test_cmd += ['--results-dest-dir', args.logs_dir]
|
||||
|
||||
test_env = setup_env()
|
||||
if args.deploy_chrome:
|
||||
|
|
Загрузка…
Ссылка в новой задаче