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

Side by Side Diff: tools/android/find_annotated_tests.py

Issue 2164073002: Fix error in find annotated tests script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Finds all the annotated tests from proguard dump""" 6 """Finds all the annotated tests from proguard dump"""
7 7
8 import argparse 8 import argparse
9 import datetime 9 import datetime
10 import json 10 import json
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 help='INFO verbosity') 155 help='INFO verbosity')
156 156
157 arguments = parser.parse_args(sys.argv[1:]) 157 arguments = parser.parse_args(sys.argv[1:])
158 logging.basicConfig( 158 logging.basicConfig(
159 level=logging.INFO if arguments.verbose else logging.WARNING) 159 level=logging.INFO if arguments.verbose else logging.WARNING)
160 160
161 if arguments.timestamp_string is None: 161 if arguments.timestamp_string is None:
162 script_runtime = datetime.datetime.utcnow() 162 script_runtime = datetime.datetime.utcnow()
163 script_runtime_string = script_runtime.strftime(_EXPORT_TIME_FORMAT) 163 script_runtime_string = script_runtime.strftime(_EXPORT_TIME_FORMAT)
164 else: 164 else:
165 script_runtime = arguments.timestamp_string 165 script_runtime_string = arguments.timestamp_string
166 logging.info('Build time is %s', script_runtime_string) 166 logging.info('Build time is %s', script_runtime_string)
167 apk_output_dir = os.path.abspath(os.path.join( 167 apk_output_dir = os.path.abspath(os.path.join(
168 constants.DIR_SOURCE_ROOT, arguments.apk_output_dir)) 168 constants.DIR_SOURCE_ROOT, arguments.apk_output_dir))
169 report_data = _GetReport( 169 report_data = _GetReport(
170 arguments.test_apks, script_runtime_string, apk_output_dir) 170 arguments.test_apks, script_runtime_string, apk_output_dir)
171 171
172 json_output_path = os.path.join( 172 json_output_path = os.path.join(
173 arguments.json_output_dir, 173 arguments.json_output_dir,
174 '%s-android-chrome.json' % script_runtime_string) 174 '%s-android-chrome.json' % script_runtime_string)
175 with open(json_output_path, 'w') as f: 175 with open(json_output_path, 'w') as f:
176 json.dump(report_data, f, sort_keys=True, separators=(',',': ')) 176 json.dump(report_data, f, sort_keys=True, separators=(',',': '))
177 logging.info('Saved json output file to %s', json_output_path) 177 logging.info('Saved json output file to %s', json_output_path)
178 178
179 179
180 if __name__ == '__main__': 180 if __name__ == '__main__':
181 sys.exit(main()) 181 sys.exit(main())
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