Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: build/android/pylib/local/device/local_device_instrumentation_test_run.py

Issue 2753993002: (Reland) Use logdog butler subcommand to run tests. (Closed)
Patch Set: when see none, don't return immediately Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/local/device/local_device_instrumentation_test_run.py
diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
index 1cc82f961405df3dcc7533a7ff1551c743fca76d..4eef43d61c91332bb6533e01ea49a8fe231c9d56 100644
--- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py
+++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
@@ -35,6 +35,9 @@ TIMEOUT_ANNOTATIONS = [
('SmallTest', 1 * 60),
]
+LOGCAT_FILTERS = ['*:e', 'chromium:v', 'cr_chromium:v',
+ 'cr_ChromiumAndroidLinker:v', 'cr_LibraryLoader:v',
+ 'cr_LinkerTest:v']
# TODO(jbudorick): Make this private once the instrumentation test_runner is
# deprecated.
@@ -291,15 +294,27 @@ class LocalDeviceInstrumentationTestRun(
time.strftime('%Y%m%dT%H%M%S', time.localtime()),
device.serial)
logmon = logdog_logcat_monitor.LogdogLogcatMonitor(
- device.adb, stream_name)
+ device.adb, stream_name, filter_specs=LOGCAT_FILTERS)
+
+ logdog_upload_start = time.time()
jbudorick 2017/03/17 19:20:21 We will not want to include this timing/tracing lo
BigBossZhiling 2017/03/20 22:09:50 Done.
with contextlib_ext.Optional(
- logmon, self._test_instance.should_save_logcat):
+ trace_event.trace('%s_%s' % (test_name, 'including_logdog_upload')),
+ self._env.trace_output):
with contextlib_ext.Optional(
- trace_event.trace(test_name),
- self._env.trace_output):
- output = device.StartInstrumentation(
- target, raw=True, extras=extras, timeout=timeout, retries=0)
+ logmon, self._test_instance.should_save_logcat):
+ with contextlib_ext.Optional(
+ trace_event.trace(test_name),
+ self._env.trace_output):
+ test_start = time.time()
+ output = device.StartInstrumentation(
+ target, raw=True, extras=extras, timeout=timeout, retries=0)
+ test_end = time.time()
logcat_url = logmon.GetLogcatURL()
+ logdog_upload_end = time.time()
+ test_time = test_end - test_start
+ including_logdog_test_time = logdog_upload_end - logdog_upload_start
+ lag_in_logdog = including_logdog_test_time - test_time
+ logging.info('logdog_upload_affects (in second): %0.6f', lag_in_logdog)
finally:
device.RunShellCommand(
['log', '-p', 'i', '-t', _TAG, 'END %s' % test_name],

Powered by Google App Engine
This is Rietveld 408576698