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

Unified 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: Adding link to dashboard bug. Created 4 years, 8 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/bisect_tester/perf_test.py
diff --git a/scripts/slave/recipe_modules/bisect_tester/perf_test.py b/scripts/slave/recipe_modules/bisect_tester/perf_test.py
index 0c6f3147070eea41641f50a997cf0935d8a0308c..d4f8208b565c4dc012adee65e8fff6056ce04a33 100644
--- a/scripts/slave/recipe_modules/bisect_tester/perf_test.py
+++ b/scripts/slave/recipe_modules/bisect_tester/perf_test.py
@@ -199,12 +199,28 @@ def _run_command(api, command, step_name):
if 'android-chrome' in command: # pragma: no cover
kwargs['env'] = {'CHROMIUM_OUTPUT_DIR': api.m.chromium.output_dir}
+ # By default, we assume that the test to run is an executable binary. In the
+ # case of python scripts, runtest.py will guess based on the extension.
+ python_mode = False
+ if command_parts[0] == 'python': # pragma: no cover
+ # Dashboard prepends the command with 'python' when on windows, however, it
+ # is not necessary to pass this along to the runtest.py invocation.
+ # TODO(robertocn): Remove this clause when dashboard stops sending python as
+ # part of the command.
+ # https://github.com/catapult-project/catapult/issues/2283
+ command_parts = command_parts[1:]
+ python_mode = True
+ elif _is_telemetry_command(command):
+ # run_benchmark is a python script without an extension, hence we force
+ # python mode.
+ python_mode = True
try:
step_result = api.m.chromium.runtest(
test=_rebase_path(command_parts[0]),
args=command_parts[1:],
xvfb=True,
name=step_name,
+ python_mode=python_mode,
stdout=stdout,
stderr=stderr,
**kwargs)
« 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