| 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 c0622072c5dfd07ba89c7209cf4d8005e644bb7d..d7094c41c4236ccc822b7447d77b273aa7115a72 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):
|
|
|