Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(694)

Side by Side Diff: scripts/slave/recipe_modules/ios/api.py

Issue 2262543003: Use json.loads instead of json.load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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]
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698