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

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

Issue 2130833002: Handling the case when command paths start with ./src or .\src (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 5 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 | no next file » | 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 057e8a152aaf8a24f12059e0a802cff38b1a93cb..f6297a7398f33d449128e312ce105a366dbb3c15 100644
--- a/scripts/slave/recipe_modules/bisect_tester/perf_test.py
+++ b/scripts/slave/recipe_modules/bisect_tester/perf_test.py
@@ -187,10 +187,13 @@ def _rebase_path(api, file_path):
We want to pass to runtest.py an absolute path if possible.
"""
- if file_path.startswith('src/'):
- return api.m.path['checkout'].join(*file_path.split('/')[1:])
- elif file_path.startswith('src\\'): # pragma: no cover
- return api.m.path['checkout'].join(*file_path.split('\\')[1:])
+ if (file_path.startswith('src/') or file_path.startswith('./src/')):
+ return api.m.path['checkout'].join(
+ *file_path.split('src', 1)[1].split('/')[1:])
+ elif (file_path.startswith('src\\') or
+ file_path.startswith('.\\src\\')): # pragma: no cover
+ return api.m.path['checkout'].join(
+ *file_path.split('src', 1)[1].split('\\')[1:])
return file_path
def _run_command(api, command, step_name):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698