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

Side by Side Diff: scripts/slave/recipe_modules/test_results/resources/upload_gtest_test_results.py

Issue 1570293002: Flakiness dashboard: turn off json logging completely until determining an appropriate amount to lo… (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 11 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 (c) 2015 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2015 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 """See README.md for usage instructions. 6 """See README.md for usage instructions.
7 7
8 This file heavily modified from build/scripts/slave/gtest_slave_utils.py and 8 This file heavily modified from build/scripts/slave/gtest_slave_utils.py and
9 is intended to replace it as all tests move to swarming. 9 is intended to replace it as all tests move to swarming.
10 TODO(estaab): Remove build/scripts/slave/gtest.* once this is fully deployed. 10 TODO(estaab): Remove build/scripts/slave/gtest.* once this is fully deployed.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 options.builder_name, options.test_results_server) 137 options.builder_name, options.test_results_server)
138 attrs = [('builder', options.builder_name), 138 attrs = [('builder', options.builder_name),
139 ('testtype', options.test_type), 139 ('testtype', options.test_type),
140 ('master', options.master_name)] 140 ('master', options.master_name)]
141 141
142 files = [(f, os.path.join(options.results_directory, f)) for f in 142 files = [(f, os.path.join(options.results_directory, f)) for f in
143 (FULL_RESULTS_FILENAME, TIMES_MS_FILENAME)] 143 (FULL_RESULTS_FILENAME, TIMES_MS_FILENAME)]
144 144
145 # Set uploading timeout in case appengine server is having problem. 145 # Set uploading timeout in case appengine server is having problem.
146 # 120 seconds are more than enough to upload test results. 146 # 120 seconds are more than enough to upload test results.
147 try: 147 test_results_uploader.upload_test_results(
148 test_results_uploader.upload_test_results( 148 options.test_results_server, attrs, files, 120)
149 options.test_results_server, attrs, files, 120)
150 except test_results_uploader.PermanentError as e:
151 # Dump the offending input gtest json to stderr to aid in debugging.
152 print>>sys.stderr, 'Dump of test results json causing a permanent error:'
153 for _, json_filename in files:
154 with file(json_filename) as json_file:
155 print>>sys.stderr, '%s:' % json_filename
156 sys.stderr.write(json_file.read())
157 print>>sys.stderr, ''
158 raise
159 return 0 149 return 0
160 150
161 151
162 if __name__ == '__main__': 152 if __name__ == '__main__':
163 sys.exit(main()) 153 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