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

Side by Side Diff: build/android/pylib/perf/test_runner.py

Issue 1284283002: [Android] Add partial output to TimeoutError raised in cmd_helper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « build/android/pylib/cmd_helper.py ('k') | 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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 """Runs perf tests. 5 """Runs perf tests.
6 6
7 Our buildbot infrastructure requires each slave to run steps serially. 7 Our buildbot infrastructure requires each slave to run steps serially.
8 This is sub-optimal for android, where these steps can run independently on 8 This is sub-optimal for android, where these steps can run independently on
9 multiple connected devices. 9 multiple connected devices.
10 10
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 logfile = _HeartBeatLogger() 300 logfile = _HeartBeatLogger()
301 cwd = os.path.abspath(constants.DIR_SOURCE_ROOT) 301 cwd = os.path.abspath(constants.DIR_SOURCE_ROOT)
302 if full_cmd.startswith('src/'): 302 if full_cmd.startswith('src/'):
303 cwd = os.path.abspath(os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)) 303 cwd = os.path.abspath(os.path.join(constants.DIR_SOURCE_ROOT, os.pardir))
304 try: 304 try:
305 exit_code, output = cmd_helper.GetCmdStatusAndOutputWithTimeout( 305 exit_code, output = cmd_helper.GetCmdStatusAndOutputWithTimeout(
306 full_cmd, timeout, cwd=cwd, shell=True, logfile=logfile) 306 full_cmd, timeout, cwd=cwd, shell=True, logfile=logfile)
307 json_output = self._ReadChartjsonOutput() 307 json_output = self._ReadChartjsonOutput()
308 except cmd_helper.TimeoutError as e: 308 except cmd_helper.TimeoutError as e:
309 exit_code = -1 309 exit_code = -1
310 output = str(e) 310 output = e.output
311 json_output = '' 311 json_output = ''
312 finally: 312 finally:
313 self._CleanupOutputDirectory() 313 self._CleanupOutputDirectory()
314 if self._options.single_step: 314 if self._options.single_step:
315 logfile.stop() 315 logfile.stop()
316 end_time = time.time() 316 end_time = time.time()
317 if exit_code is None: 317 if exit_code is None:
318 exit_code = -1 318 exit_code = -1
319 logging.info('%s : exit_code=%d in %d secs at %s', 319 logging.info('%s : exit_code=%d in %d secs at %s',
320 test_name, exit_code, end_time - start_time, 320 test_name, exit_code, end_time - start_time,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 Returns: 366 Returns:
367 A tuple of (TestRunResults, retry). 367 A tuple of (TestRunResults, retry).
368 """ 368 """
369 _, result_type = self._LaunchPerfTest(test_name) 369 _, result_type = self._LaunchPerfTest(test_name)
370 results = base_test_result.TestRunResults() 370 results = base_test_result.TestRunResults()
371 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) 371 results.AddResult(base_test_result.BaseTestResult(test_name, result_type))
372 retry = None 372 retry = None
373 if not results.DidRunPass(): 373 if not results.DidRunPass():
374 retry = test_name 374 retry = test_name
375 return results, retry 375 return results, retry
OLDNEW
« no previous file with comments | « build/android/pylib/cmd_helper.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698