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

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

Issue 22904005: Android: run perf test runner with -v and print the command line. (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 | « build/android/bb_run_sharded_steps.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 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 """Runs a perf test. 101 """Runs a perf test.
102 102
103 Args: 103 Args:
104 test_name: the name of the test to be executed. 104 test_name: the name of the test to be executed.
105 105
106 Returns: 106 Returns:
107 A tuple containing (Output, base_test_result.ResultType) 107 A tuple containing (Output, base_test_result.ResultType)
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 start_time = datetime.datetime.now() 112 start_time = datetime.datetime.now()
112 output, exit_code = pexpect.run( 113 output, exit_code = pexpect.run(
113 cmd, cwd=os.path.abspath(constants.DIR_SOURCE_ROOT), 114 cmd, cwd=os.path.abspath(constants.DIR_SOURCE_ROOT),
114 withexitstatus=True, logfile=sys.stdout, timeout=1800, 115 withexitstatus=True, logfile=sys.stdout, timeout=1800,
115 env=os.environ) 116 env=os.environ)
116 end_time = datetime.datetime.now() 117 end_time = datetime.datetime.now()
117 logging.info('%s : exit_code=%d in %d secs at %s', 118 logging.info('%s : exit_code=%d in %d secs at %s',
118 test_name, exit_code, (end_time - start_time).seconds, 119 test_name, exit_code, (end_time - start_time).seconds,
119 self.device) 120 self.device)
120 result_type = base_test_result.ResultType.FAIL 121 result_type = base_test_result.ResultType.FAIL
(...skipping 24 matching lines...) Expand all
145 Returns: 146 Returns:
146 A tuple of (TestRunResults, retry). 147 A tuple of (TestRunResults, retry).
147 """ 148 """
148 output, result_type = self._LaunchPerfTest(test_name) 149 output, result_type = self._LaunchPerfTest(test_name)
149 results = base_test_result.TestRunResults() 150 results = base_test_result.TestRunResults()
150 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) 151 results.AddResult(base_test_result.BaseTestResult(test_name, result_type))
151 retry = None 152 retry = None
152 if not results.DidRunPass(): 153 if not results.DidRunPass():
153 retry = test_name 154 retry = test_name
154 return results, retry 155 return results, retry
OLDNEW
« no previous file with comments | « build/android/bb_run_sharded_steps.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698