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

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

Issue 17288008: [Android] Fix _WatchTestOutput after r207099 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 5
6 import logging 6 import logging
7 import os 7 import os
8 import re 8 import re
9 9
10 from pylib import constants 10 from pylib import constants
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 full_test_name, base_test_result.ResultType.FAIL, log=log)) 172 full_test_name, base_test_result.ResultType.FAIL, log=log))
173 except pexpect.EOF: 173 except pexpect.EOF:
174 logging.error('Test terminated - EOF') 174 logging.error('Test terminated - EOF')
175 # We're here because either the device went offline, or the test harness 175 # We're here because either the device went offline, or the test harness
176 # crashed without outputting the CRASHED marker (crbug.com/175538). 176 # crashed without outputting the CRASHED marker (crbug.com/175538).
177 if not self.adb.IsOnline(): 177 if not self.adb.IsOnline():
178 raise errors.DeviceUnresponsiveError('Device %s went offline.' % 178 raise errors.DeviceUnresponsiveError('Device %s went offline.' %
179 self.device) 179 self.device)
180 if full_test_name: 180 if full_test_name:
181 results.AddResult(base_test_result.BaseTestResult( 181 results.AddResult(base_test_result.BaseTestResult(
182 full_test_name, base_test_result.ResultType.CRASH, log=log)) 182 full_test_name, base_test_result.ResultType.CRASH,
183 log=p.before.replace('\r', '')))
183 except pexpect.TIMEOUT: 184 except pexpect.TIMEOUT:
184 logging.error('Test terminated after %d second timeout.', 185 logging.error('Test terminated after %d second timeout.',
185 self.timeout) 186 self.timeout)
186 if full_test_name: 187 if full_test_name:
187 results.AddResult(base_test_result.BaseTestResult( 188 results.AddResult(base_test_result.BaseTestResult(
188 full_test_name, base_test_result.ResultType.TIMEOUT, log=log)) 189 full_test_name, base_test_result.ResultType.TIMEOUT,
190 log=p.before.replace('\r', '')))
189 finally: 191 finally:
190 p.close() 192 p.close()
191 193
192 ret_code = self._GetGTestReturnCode() 194 ret_code = self._GetGTestReturnCode()
193 if ret_code: 195 if ret_code:
194 logging.critical( 196 logging.critical(
195 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', 197 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s',
196 ret_code, p.before, p.after) 198 ret_code, p.before, p.after)
197 199
198 return results 200 return results
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698