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

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

Issue 66373004: Android: allow a --single-step for test_runner.py perf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 7 years, 1 month 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 | « build/android/pylib/perf/test_options.py ('k') | build/android/test_runner.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 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 logging.info('%s : %s', test_name, cmd) 134 logging.info('%s : %s', test_name, cmd)
135 start_time = datetime.datetime.now() 135 start_time = datetime.datetime.now()
136 136
137 timeout = 1800 137 timeout = 1800
138 if self._options.no_timeout: 138 if self._options.no_timeout:
139 timeout = None 139 timeout = None
140 full_cmd = cmd 140 full_cmd = cmd
141 if self._options.dry_run: 141 if self._options.dry_run:
142 full_cmd = 'echo %s' % cmd 142 full_cmd = 'echo %s' % cmd
143 143
144 logfile = sys.stdout
145 if self._options.single_step:
146 logfile = None
144 output, exit_code = pexpect.run( 147 output, exit_code = pexpect.run(
145 full_cmd, cwd=os.path.abspath(constants.DIR_SOURCE_ROOT), 148 full_cmd, cwd=os.path.abspath(constants.DIR_SOURCE_ROOT),
146 withexitstatus=True, logfile=sys.stdout, timeout=timeout, 149 withexitstatus=True, logfile=logfile, timeout=timeout,
147 env=os.environ) 150 env=os.environ)
148 end_time = datetime.datetime.now() 151 end_time = datetime.datetime.now()
149 if exit_code is None: 152 if exit_code is None:
150 exit_code = -1 153 exit_code = -1
151 logging.info('%s : exit_code=%d in %d secs at %s', 154 logging.info('%s : exit_code=%d in %d secs at %s',
152 test_name, exit_code, (end_time - start_time).seconds, 155 test_name, exit_code, (end_time - start_time).seconds,
153 self.device) 156 self.device)
154 result_type = base_test_result.ResultType.FAIL 157 result_type = base_test_result.ResultType.FAIL
155 if exit_code == 0: 158 if exit_code == 0:
156 result_type = base_test_result.ResultType.PASS 159 result_type = base_test_result.ResultType.PASS
(...skipping 28 matching lines...) Expand all
185 Returns: 188 Returns:
186 A tuple of (TestRunResults, retry). 189 A tuple of (TestRunResults, retry).
187 """ 190 """
188 output, result_type = self._LaunchPerfTest(test_name) 191 output, result_type = self._LaunchPerfTest(test_name)
189 results = base_test_result.TestRunResults() 192 results = base_test_result.TestRunResults()
190 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) 193 results.AddResult(base_test_result.BaseTestResult(test_name, result_type))
191 retry = None 194 retry = None
192 if not results.DidRunPass(): 195 if not results.DidRunPass():
193 retry = test_name 196 retry = test_name
194 return results, retry 197 return results, retry
OLDNEW
« no previous file with comments | « build/android/pylib/perf/test_options.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698