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

Unified Diff: scripts/slave/recipe_modules/bisect_tester/perf_test.py

Issue 1875263002: Changing bisect_tester module to invoke run_test.py (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Retraining expectations after rebase. 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 3042d6fe0dac402e69c8fc6d95175d81b8c88758..0c6f3147070eea41641f50a997cf0935d8a0308c 100644
--- a/scripts/slave/recipe_modules/bisect_tester/perf_test.py
+++ b/scripts/slave/recipe_modules/bisect_tester/perf_test.py
@@ -182,12 +182,13 @@ def find_values(results, metric): # pragma: no cover
results, metric.as_pair())
return has_valid_value, value
+def _rebase_path(file_path):
+ """Attempts to make a path relative src/out/Release"""
+ if file_path.startswith('src/tools') or file_path.startswith(r'src\tools'):
+ return os.path.join(os.pardir, os.pardir, os.pardir, file_path)
+ return file_path
def _run_command(api, command, step_name):
- # TODO(robertocn): Reevaluate this approach when adding support for non-perf
- # tests and non-linux platforms.
- if api.m.platform.is_linux and 'xvfb' not in command:
- command = 'xvfb-run -a ' + command
command_parts = command.split()
stdout = api.m.raw_io.output()
stderr = api.m.raw_io.output()
@@ -199,9 +200,11 @@ def _run_command(api, command, step_name):
kwargs['env'] = {'CHROMIUM_OUTPUT_DIR': api.m.chromium.output_dir}
try:
- step_result = api.m.step(
- step_name,
- command_parts,
+ step_result = api.m.chromium.runtest(
+ test=_rebase_path(command_parts[0]),
+ args=command_parts[1:],
+ xvfb=True,
+ name=step_name,
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