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

Side by Side Diff: scripts/slave/recipe_modules/bisect_tester/perf_test.py

Issue 1915183002: Setting --run-python-script flag for runtest.py invocation. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | scripts/slave/recipes/bisection/android_bisect.expected/basic_perf_tryjob_android_fyi_perf_bisect.json » ('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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import os 5 import os
6 import re 6 import re
7 import time 7 import time
8 8
9 from . import parse_metric 9 from . import parse_metric
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 command_parts = command.split() 192 command_parts = command.split()
193 stdout = api.m.raw_io.output() 193 stdout = api.m.raw_io.output()
194 stderr = api.m.raw_io.output() 194 stderr = api.m.raw_io.output()
195 195
196 # TODO(prasadv): Remove this once bisect runs are no longer running 196 # TODO(prasadv): Remove this once bisect runs are no longer running
197 # against revisions from February 2016 or earlier. 197 # against revisions from February 2016 or earlier.
198 kwargs = {} 198 kwargs = {}
199 if 'android-chrome' in command: # pragma: no cover 199 if 'android-chrome' in command: # pragma: no cover
200 kwargs['env'] = {'CHROMIUM_OUTPUT_DIR': api.m.chromium.output_dir} 200 kwargs['env'] = {'CHROMIUM_OUTPUT_DIR': api.m.chromium.output_dir}
201 201
202 run_python_command = False
203 if command_parts[0].startswith('python'): # pragma: no cover
204 # Handling case when dashboard sends python as the command (for windows).
205 command_parts = command_parts[1:]
206 run_python_command = True
207 elif _is_telemetry_command(command):
208 run_python_command = True
sullivan 2016/04/25 18:43:12 The code could use some more comments explaining e
RobertoCN 2016/04/25 19:34:31 Done.
202 try: 209 try:
203 step_result = api.m.chromium.runtest( 210 step_result = api.m.chromium.runtest(
204 test=_rebase_path(command_parts[0]), 211 test=_rebase_path(command_parts[0]),
205 args=command_parts[1:], 212 args=command_parts[1:],
206 xvfb=True, 213 xvfb=True,
207 name=step_name, 214 name=step_name,
215 python_mode=run_python_command,
208 stdout=stdout, 216 stdout=stdout,
209 stderr=stderr, 217 stderr=stderr,
210 **kwargs) 218 **kwargs)
211 step_result.presentation.logs['Captured Output'] = ( 219 step_result.presentation.logs['Captured Output'] = (
212 step_result.stdout or '').splitlines() 220 step_result.stdout or '').splitlines()
213 except api.m.step.StepFailure as sf: 221 except api.m.step.StepFailure as sf:
214 sf.result.presentation.logs['Failure Output'] = ( 222 sf.result.presentation.logs['Failure Output'] = (
215 sf.result.stdout or '').splitlines() 223 sf.result.stdout or '').splitlines()
216 if sf.result.stderr: # pragma: no cover 224 if sf.result.stderr: # pragma: no cover
217 sf.result.presentation.logs['stderr'] = ( 225 sf.result.presentation.logs['stderr'] = (
218 sf.result.stderr).splitlines() 226 sf.result.stderr).splitlines()
219 return sf.result.stdout, sf.result.stderr, sf.result.retcode 227 return sf.result.stdout, sf.result.stderr, sf.result.retcode
220 return step_result.stdout, step_result.stderr, step_result.retcode 228 return step_result.stdout, step_result.stderr, step_result.retcode
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/bisection/android_bisect.expected/basic_perf_tryjob_android_fyi_perf_bisect.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698