Chromium Code Reviews| 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..7c272e8f96c8a129adf48a1f0d5e40de71f56f9e 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): |
|
M-A Ruel
2014/06/04 00:52:53
Side note: it's interesting because in the last CL
Vadim Sh.
2014/06/04 02:58:26
I've realized I need to pass crapload of additiona
|
| """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,14 @@ 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. |
| + if 'abort_on_failure' not in kwargs: |
|
M-A Ruel
2014/06/04 00:52:53
What you want is:
kwargs.setdefault('abort_on_fail
Vadim Sh.
2014/06/04 02:58:26
Done.
|
| + kwargs['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 +77,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 +85,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): |