| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import copy | 5 import copy |
| 6 | 6 |
| 7 from recipe_engine import recipe_api | 7 from recipe_engine import recipe_api |
| 8 | 8 |
| 9 | 9 |
| 10 class iOSApi(recipe_api.RecipeApi): | 10 class iOSApi(recipe_api.RecipeApi): |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 step_result.presentation.step_text = ( | 742 step_result.presentation.step_text = ( |
| 743 'Unexpected infrastructure failure.' | 743 'Unexpected infrastructure failure.' |
| 744 ) | 744 ) |
| 745 infra_failures.append(task.step_name) | 745 infra_failures.append(task.step_name) |
| 746 | 746 |
| 747 # Add any iOS test runner results to the display. | 747 # Add any iOS test runner results to the display. |
| 748 test_summary = self.m.path.join( | 748 test_summary = self.m.path.join( |
| 749 task.task.task_output_dir, '0', 'summary.json') | 749 task.task.task_output_dir, '0', 'summary.json') |
| 750 if self.m.path.exists(test_summary): # pragma: no cover | 750 if self.m.path.exists(test_summary): # pragma: no cover |
| 751 with open(test_summary) as f: | 751 with open(test_summary) as f: |
| 752 test_summary_json = self.m.json.load(f) | 752 test_summary_json = self.m.json.loads(f.read()) |
| 753 step_result.presentation.logs['test_summary.json'] = self.m.json.dumps( | 753 step_result.presentation.logs['test_summary.json'] = self.m.json.dumps( |
| 754 test_summary_json, indent=2).splitlines() | 754 test_summary_json, indent=2).splitlines() |
| 755 step_result.presentation.logs.update(test_summary_json.get('logs', {})) | 755 step_result.presentation.logs.update(test_summary_json.get('logs', {})) |
| 756 step_result.presentation.links.update( | 756 step_result.presentation.links.update( |
| 757 test_summary_json.get('links', {})) | 757 test_summary_json.get('links', {})) |
| 758 if test_summary_json.get('step_text'): | 758 if test_summary_json.get('step_text'): |
| 759 step_result.presentation.step_text = '%s<br />%s' % ( | 759 step_result.presentation.step_text = '%s<br />%s' % ( |
| 760 step_result.presentation.step_text, test_summary_json['step_text']) | 760 step_result.presentation.step_text, test_summary_json['step_text']) |
| 761 | 761 |
| 762 if test_failures: | 762 if test_failures: |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 self.configuration, | 818 self.configuration, |
| 819 'iossim', | 819 'iossim', |
| 820 ), | 820 ), |
| 821 'ninja': self.m.path.join( | 821 'ninja': self.m.path.join( |
| 822 'src', | 822 'src', |
| 823 build_dir, | 823 build_dir, |
| 824 '%s-%s' % (self.configuration, platform), | 824 '%s-%s' % (self.configuration, platform), |
| 825 'iossim', | 825 'iossim', |
| 826 ), | 826 ), |
| 827 }[self.compiler] | 827 }[self.compiler] |
| OLD | NEW |