Index: scripts/slave/recipe_modules/isolate/api.py |
diff --git a/scripts/slave/recipe_modules/isolate/api.py b/scripts/slave/recipe_modules/isolate/api.py |
index 5f647262e6abb688071a36dd756b3a6e2307381d..8f2f8b8d97713bac0ef160f81888837331744fc6 100644 |
--- a/scripts/slave/recipe_modules/isolate/api.py |
+++ b/scripts/slave/recipe_modules/isolate/api.py |
@@ -38,7 +38,7 @@ class IsolateApi(recipe_api.RecipeApi): |
config.gyp_env.GYP_DEFINES['test_isolation_mode'] = 'archive' |
config.gyp_env.GYP_DEFINES['test_isolation_outdir'] = self._isolate_server |
- def find_isolated_tests(self, build_dir, targets=None): |
+ def find_isolated_tests(self, build_dir, targets=None, **kwargs): |
"""Returns a step which finds all *.isolated files in a build directory. |
Assigns the dict {target name -> *.isolated file hash} to the swarm_hashes |
@@ -48,7 +48,13 @@ class IsolateApi(recipe_api.RecipeApi): |
If |targets| is None, the step will use all *.isolated files it finds. |
Otherwise, it will verify that all |targets| are found and will use only |
them. If some expected targets are missing, will abort the build. |
+ |
+ Also accepts step execution controlling flags (always_run, can_fail_build, |
+ etc.) via kwargs. |
""" |
+ # Failure is fatal by default. |
+ kwargs.setdefault('abort_on_failure', True) |
+ |
def followup_fn(step_result): |
assert isinstance(step_result.json.output, dict) |
self._isolated_tests = step_result.json.output |
@@ -70,6 +76,7 @@ class IsolateApi(recipe_api.RecipeApi): |
if (not self._isolated_tests and |
step_result.presentation.status != 'FAILURE'): |
step_result.presentation.status = 'WARNING' |
+ |
return self.m.python( |
'find isolated tests', |
self.resource('find_isolated_tests.py'), |
@@ -77,9 +84,9 @@ class IsolateApi(recipe_api.RecipeApi): |
'--build-dir', build_dir, |
'--output-json', self.m.json.output(), |
], |
- abort_on_failure=True, |
followup_fn=followup_fn, |
- step_test_data=lambda: (self.test_api.output_json(targets))) |
+ step_test_data=lambda: (self.test_api.output_json(targets)), |
+ **kwargs) |
@property |
def isolated_tests(self): |