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

Side by Side Diff: build/android/pylib/gtest/gtest_test_instance.py

Issue 2793133003: [Android] Log gtest stdout regardless of result parsing mode. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | build/android/pylib/local/device/local_device_gtest_run.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import HTMLParser 5 import HTMLParser
6 import logging 6 import logging
7 import os 7 import os
8 import re 8 import re
9 import tempfile 9 import tempfile
10 import threading 10 import threading
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 test_name = None 136 test_name = None
137 137
138 def handle_possibly_unknown_test(): 138 def handle_possibly_unknown_test():
139 if test_name is not None: 139 if test_name is not None:
140 results.append(base_test_result.BaseTestResult( 140 results.append(base_test_result.BaseTestResult(
141 TestNameWithoutDisabledPrefix(test_name), 141 TestNameWithoutDisabledPrefix(test_name),
142 fallback_result_type or base_test_result.ResultType.UNKNOWN, 142 fallback_result_type or base_test_result.ResultType.UNKNOWN,
143 duration, log=('\n'.join(log) if log else ''))) 143 duration, log=('\n'.join(log) if log else '')))
144 144
145 for l in output: 145 for l in output:
146 logging.info(l)
147 matcher = _RE_TEST_STATUS.match(l) 146 matcher = _RE_TEST_STATUS.match(l)
148 if matcher: 147 if matcher:
149 if matcher.group(1) == 'RUN': 148 if matcher.group(1) == 'RUN':
150 handle_possibly_unknown_test() 149 handle_possibly_unknown_test()
151 duration = 0 150 duration = 0
152 fallback_result_type = None 151 fallback_result_type = None
153 log = [] 152 log = []
154 result_type = None 153 result_type = None
155 elif matcher.group(1) == 'OK': 154 elif matcher.group(1) == 'OK':
156 result_type = base_test_result.ResultType.PASS 155 result_type = base_test_result.ResultType.PASS
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 '%s' % l for l in (line.strip() for line in disabled_tests_file) 504 '%s' % l for l in (line.strip() for line in disabled_tests_file)
506 if l and not l.startswith('#')] 505 if l and not l.startswith('#')]
507 506
508 return '*-%s' % ':'.join(disabled_filter_items) 507 return '*-%s' % ':'.join(disabled_filter_items)
509 508
510 #override 509 #override
511 def TearDown(self): 510 def TearDown(self):
512 """Do nothing.""" 511 """Do nothing."""
513 pass 512 pass
514 513
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/local/device/local_device_gtest_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698