Chromium Code Reviews| Index: scripts/slave/recipe_modules/chromium_android/api.py |
| diff --git a/scripts/slave/recipe_modules/chromium_android/api.py b/scripts/slave/recipe_modules/chromium_android/api.py |
| index 9b2008567e1e357194ec3885bcaefd190df0acfa..9a516f44d6753baf359e79bdf0b28afcb17421c8 100644 |
| --- a/scripts/slave/recipe_modules/chromium_android/api.py |
| +++ b/scripts/slave/recipe_modules/chromium_android/api.py |
| @@ -898,6 +898,7 @@ class AndroidApi(recipe_api.RecipeApi): |
| result_details=False, |
| cs_base_url=None, |
| store_tombstones=False, |
| + render_results_dir=None, |
| **kwargs): |
| args = [ |
| '--blacklist-file', self.blacklist_file, |
| @@ -957,6 +958,8 @@ class AndroidApi(recipe_api.RecipeApi): |
| **kwargs) |
| finally: |
| result_step = self.m.step.active_result |
| + if render_results_dir: |
| + self._upload_render_test_failures(render_results_dir) |
| if result_details: |
| if (hasattr(result_step, 'test_utils') and |
| hasattr(result_step.test_utils, 'gtest_results')): |
| @@ -965,10 +968,8 @@ class AndroidApi(recipe_api.RecipeApi): |
| details = self.create_result_details(step_name, |
| json_results, |
| cs_base_url) |
| - self.m.step.active_result.presentation.logs[ |
| - 'result_details'] = details |
| - self.copy_gtest_results(result_step, |
|
jbudorick
2016/11/03 18:34:36
This worries me.
mikecase (-- gone --)
2016/11/03 18:41:37
I think this should be fine. As long as nothing tr
jbudorick
2016/11/07 21:58:56
I'm particularly worried if something tries to use
mikecase (-- gone --)
2016/11/07 23:38:29
Gaahhhhhhh. Looking around I can't actually tell i
|
| - self.m.step.active_result) |
| + self.m.step.active_result.presentation.logs['result_details'] = ( |
| + details) |
| return step_result |
| def copy_gtest_results(self, result_step, active_step): |
| @@ -993,6 +994,23 @@ class AndroidApi(recipe_api.RecipeApi): |
| '<!DOCTYPE html><html></html>'))) |
| return result_details.stdout.splitlines() |
| + def _upload_render_test_failures(self, render_results_dir): |
| + """Uploads render test results. Generates HTML file displaying results.""" |
| + args = ['--output-html-file', self.m.raw_io.output(), |
| + '--buildername', self.m.properties['buildername'], |
| + '--build-number', self.m.properties['buildnumber'], |
| + '--render-results-dir', render_results_dir] |
| + step_result = self.m.python( |
| + name='[Render Tests] Upload Results', |
| + script=self.m.path['checkout'].join( |
| + 'build', 'android', 'render_tests', |
| + 'process_render_test_results.py'), |
| + args=args, |
| + step_test_data=lambda: self.m.raw_io.test_api.output( |
| + '<!DOCTYPE html><html></html>')) |
| + step_result.presentation.logs['render results'] = ( |
| + step_result.raw_io.output.splitlines()) |
| + |
| def logcat_dump(self, gs_bucket=None): |
| if gs_bucket: |
| log_path = self.m.chromium.output_dir.join('full_log') |
| @@ -1199,7 +1217,7 @@ class AndroidApi(recipe_api.RecipeApi): |
| if json_results_file: |
| args.extend(['--json-results-file', json_results_file]) |
| - self.test_runner( |
| + return self.test_runner( |
| '%s%s' % (str(suite), ' (%s)' % suffix if suffix else ''), |
| ['junit', '-s', suite] + args, |
| env=self.m.chromium.get_env(), |