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

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

Issue 22875036: Android perf test runner: fixes exit_code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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 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 a perf test on a single device. 5 """Runs a perf test on a single device.
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 """ 108 """
109 cmd = ('%s --device %s --keep_test_server_ports' % 109 cmd = ('%s --device %s --keep_test_server_ports' %
110 (self._tests[test_name], self.device)) 110 (self._tests[test_name], self.device))
111 logging.info('%s : %s', test_name, cmd) 111 logging.info('%s : %s', test_name, cmd)
112 start_time = datetime.datetime.now() 112 start_time = datetime.datetime.now()
113 output, exit_code = pexpect.run( 113 output, exit_code = pexpect.run(
114 cmd, cwd=os.path.abspath(constants.DIR_SOURCE_ROOT), 114 cmd, cwd=os.path.abspath(constants.DIR_SOURCE_ROOT),
115 withexitstatus=True, logfile=sys.stdout, timeout=1800, 115 withexitstatus=True, logfile=sys.stdout, timeout=1800,
116 env=os.environ) 116 env=os.environ)
117 end_time = datetime.datetime.now() 117 end_time = datetime.datetime.now()
118 if exit_code is None:
119 exit_code = -1
frankf 2013/08/22 17:43:06 Ah, this might a bug in pexpect I was talking abou
bulach 2013/08/23 09:01:16 :) I don't quite get why / which test happened ye
118 logging.info('%s : exit_code=%d in %d secs at %s', 120 logging.info('%s : exit_code=%d in %d secs at %s',
119 test_name, exit_code, (end_time - start_time).seconds, 121 test_name, exit_code, (end_time - start_time).seconds,
120 self.device) 122 self.device)
121 result_type = base_test_result.ResultType.FAIL 123 result_type = base_test_result.ResultType.FAIL
122 if exit_code == 0: 124 if exit_code == 0:
123 result_type = base_test_result.ResultType.PASS 125 result_type = base_test_result.ResultType.PASS
124 if test_name in self._flaky_tests: 126 if test_name in self._flaky_tests:
125 exit_code = 0 127 exit_code = 0
126 result_type = base_test_result.ResultType.PASS 128 result_type = base_test_result.ResultType.PASS
127 129
(...skipping 18 matching lines...) Expand all
146 Returns: 148 Returns:
147 A tuple of (TestRunResults, retry). 149 A tuple of (TestRunResults, retry).
148 """ 150 """
149 output, result_type = self._LaunchPerfTest(test_name) 151 output, result_type = self._LaunchPerfTest(test_name)
150 results = base_test_result.TestRunResults() 152 results = base_test_result.TestRunResults()
151 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) 153 results.AddResult(base_test_result.BaseTestResult(test_name, result_type))
152 retry = None 154 retry = None
153 if not results.DidRunPass(): 155 if not results.DidRunPass():
154 retry = test_name 156 retry = test_name
155 return results, retry 157 return results, retry
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