| OLD | NEW |
| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 try: |
| 148 test_results_uploader.upload_test_results( | 148 test_results_uploader.upload_test_results( |
| 149 options.test_results_server, attrs, files, 120) | 149 options.test_results_server, attrs, files, 120) |
| 150 except test_results_uploader.PermanentError as e: | 150 except test_results_uploader.PermanentError as e: |
| 151 # Dump the offending input gtest json to stderr to aid in debugging. | 151 # Dump the offending input gtest json to stderr to aid in debugging. |
| 152 print>>sys.stderr, 'Dump of input gtest json causing a permanent error:' | 152 print>>sys.stderr, 'Dump of test results json causing a permanent error:' |
| 153 with file(options.input_gtest_json) as json_file: | 153 for _, json_filename in files: |
| 154 sys.stderr.write(json_file.read()) | 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, '' |
| 155 raise | 158 raise |
| 156 return 0 | 159 return 0 |
| 157 | 160 |
| 158 | 161 |
| 159 if __name__ == '__main__': | 162 if __name__ == '__main__': |
| 160 sys.exit(main()) | 163 sys.exit(main()) |
| OLD | NEW |