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..e4a741d38f0a1fa3c5a768cb682e8c3c0d95b702 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')): |
| @@ -967,9 +970,11 @@ class AndroidApi(recipe_api.RecipeApi): |
| cs_base_url) |
| self.m.step.active_result.presentation.logs[ |
| 'result_details'] = details |
| - self.copy_gtest_results(result_step, |
| - self.m.step.active_result) |
| - return step_result |
| + # Need to copy gtest results over. A few places call |
| + # |run_instrumentation_suite| function and then look for results in |
| + # the active_result. |
| + self.copy_gtest_results(result_step, |
| + self.m.step.active_result) |
|
mikecase (-- gone --)
2016/10/25 20:53:34
So, idk what you think about this. But if render_r
jbudorick
2016/10/25 21:37:32
As written, this is kind of nasty but does work. I
|
| def copy_gtest_results(self, result_step, active_step): |
| if (hasattr(result_step, 'test_utils') and |
| @@ -993,6 +998,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') |