Index: build/android/test_runner.py |
diff --git a/build/android/test_runner.py b/build/android/test_runner.py |
index 08ec868e2b55155acc85e226f9088fae6134bda1..239f55b2988bdcbabbaeca73108bf3fafa19970d 100755 |
--- a/build/android/test_runner.py |
+++ b/build/android/test_runner.py |
@@ -12,6 +12,7 @@ import contextlib |
import itertools |
import logging |
import os |
+import shutil |
import signal |
import sys |
import threading |
@@ -36,6 +37,7 @@ from pylib.base import test_run_factory |
from pylib.constants import host_paths |
from pylib.results import json_results |
from pylib.results import report_results |
+from pylib.utils import logdog_helper |
dnj
2017/02/28 18:28:38
Don't know what this is. Why not just use the logd
BigBossZhiling
2017/02/28 22:35:47
This is a really simple wrapper written by Michael
|
from py_utils import contextlib_ext |
@@ -115,6 +117,9 @@ def AddCommonOptions(parser): |
help='Path to save test_runner trace data to. This option ' |
'has been implemented for gtest, instrumentation ' |
'test and perf test.') |
+ group.add_argument('--unified-logcats-file', |
+ dest='unified_logcats_file', |
+ help='The logcat file to upload to logdog.') |
logcat_output_group = group.add_mutually_exclusive_group() |
logcat_output_group.add_argument( |
@@ -774,6 +779,10 @@ def RunTestsInPlatformMode(args): |
str(all_pass), |
str(tot_tests), |
str(iteration_count)) |
+ if args.unified_logcats_file: |
+ with open(args.unified_logcats_file) as src: |
+ with logdog_helper.open_text('unified_logcats') as dst: |
+ shutil.copyfileobj(src, dst) |
if args.command == 'perf' and (args.steps or args.single_step): |
return 0 |