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

Unified Diff: scripts/slave/recipe_modules/chromium_tests/api.py

Issue 1933223002: Chromium: make use of new get_files_affected_by_patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: review 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/chromium_trybot.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/chromium_tests/api.py
diff --git a/scripts/slave/recipe_modules/chromium_tests/api.py b/scripts/slave/recipe_modules/chromium_tests/api.py
index de026292aa91524c1ea61570a2ca564b2f6e63f0..98b71df801fb3758ff7f50e5d355b7f918adcb38 100644
--- a/scripts/slave/recipe_modules/chromium_tests/api.py
+++ b/scripts/slave/recipe_modules/chromium_tests/api.py
@@ -652,6 +652,20 @@ class ChromiumTestsApi(recipe_api.RecipeApi):
'TESTS FAILED; retries without patch disabled (%s)'
% deapply_patch_reason)
+ def get_files_affected_by_patch(self, relative_to='src/'):
+ """Returns list of POSIX paths of files affected by patch for "analyze".
+
+ Paths are relative to `relative_to` which for analyze should be 'src/'.
+ """
+ patch_root = self.m.gclient.calculate_patch_root(
+ self.m.properties.get('patch_project'))
+ affected_files = self.m.tryserver.get_files_affected_by_patch(patch_root)
+ for i, path in enumerate(affected_files):
+ path = str(path)
+ assert path.startswith(relative_to)
+ affected_files[i] = path[len(relative_to):]
+ return affected_files
+
def analyze(self, affected_files, test_targets, additional_compile_targets,
config_file_name, mb_mastername=None, mb_buildername=None,
additional_names=None):
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium_trybot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698