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

Side by Side Diff: third_party/typ/typ/json_results.py

Issue 2658933006: Bump typ to v0.9.10 to pick up sergiyb's https fix for uploading results. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 # Copyright 2014 Google Inc. All rights reserved. 1 # Copyright 2014 Google Inc. All rights reserved.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 value['expected'] = 'PASS' 98 value['expected'] = 'PASS'
99 if value['actual'].endswith('FAIL'): 99 if value['actual'].endswith('FAIL'):
100 value['is_unexpected'] = True 100 value['is_unexpected'] = True
101 _add_path_to_trie(full_results['tests'], test_name, value) 101 _add_path_to_trie(full_results['tests'], test_name, value)
102 102
103 return full_results 103 return full_results
104 104
105 105
106 def make_upload_request(test_results_server, builder, master, testtype, 106 def make_upload_request(test_results_server, builder, master, testtype,
107 full_results): 107 full_results):
108 url = 'http://%s/testfile/upload' % test_results_server 108 url = 'https://%s/testfile/upload' % test_results_server
109 attrs = [('builder', builder), 109 attrs = [('builder', builder),
110 ('master', master), 110 ('master', master),
111 ('testtype', testtype)] 111 ('testtype', testtype)]
112 content_type, data = _encode_multipart_form_data(attrs, full_results) 112 content_type, data = _encode_multipart_form_data(attrs, full_results)
113 return url, content_type, data 113 return url, content_type, data
114 114
115 115
116 def exit_code_from_full_results(full_results): 116 def exit_code_from_full_results(full_results):
117 return 1 if num_failures(full_results) else 0 117 return 1 if num_failures(full_results) else 0
118 118
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 'filename="full_results.json"') 183 'filename="full_results.json"')
184 lines.append('Content-Type: application/json') 184 lines.append('Content-Type: application/json')
185 lines.append('') 185 lines.append('')
186 lines.append(json.dumps(test_results)) 186 lines.append(json.dumps(test_results))
187 187
188 lines.append('--' + BOUNDARY + '--') 188 lines.append('--' + BOUNDARY + '--')
189 lines.append('') 189 lines.append('')
190 body = CRLF.join(lines) 190 body = CRLF.join(lines)
191 content_type = 'multipart/form-data; boundary=%s' % BOUNDARY 191 content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
192 return content_type, body 192 return content_type, body
OLDNEW
« no previous file with comments | « third_party/typ/typ/fakes/tests/test_result_server_fake_test.py ('k') | third_party/typ/typ/tests/json_results_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698