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

Side by Side Diff: swarming.py

Issue 48863002: Set the Swarm Test encoding to UTF-8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Created 7 years, 1 month 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 | tests/swarming_test.py » ('j') | 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 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 """Client tool to trigger tasks or retrieve results from a Swarming server.""" 6 """Client tool to trigger tasks or retrieve results from a Swarming server."""
7 7
8 __version__ = '0.1' 8 __version__ = '0.1'
9 9
10 import hashlib 10 import hashlib
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 def to_json(self): 146 def to_json(self):
147 """Exports the current configuration into a swarm-readable manifest file. 147 """Exports the current configuration into a swarm-readable manifest file.
148 148
149 This function doesn't mutate the object. 149 This function doesn't mutate the object.
150 """ 150 """
151 test_case = { 151 test_case = {
152 'test_case_name': self._test_name, 152 'test_case_name': self._test_name,
153 'data': [], 153 'data': [],
154 'tests': self._tasks, 154 'tests': self._tasks,
155 # TODO: Let the encoding get set from the command line.
156 'encoding': 'UTF-8',
155 'env_vars': {}, 157 'env_vars': {},
156 'configurations': [ 158 'configurations': [
157 { 159 {
158 'min_instances': self._shards, 160 'min_instances': self._shards,
159 'config_name': self._target_platform, 161 'config_name': self._target_platform,
160 'priority': self.priority, 162 'priority': self.priority,
161 'dimensions': { 163 'dimensions': {
162 'os': self._target_platform, 164 'os': self._target_platform,
163 }, 165 },
164 }, 166 },
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 sys.stderr.write(str(e)) 662 sys.stderr.write(str(e))
661 sys.stderr.write('\n') 663 sys.stderr.write('\n')
662 return 1 664 return 1
663 665
664 666
665 if __name__ == '__main__': 667 if __name__ == '__main__':
666 fix_encoding.fix_encoding() 668 fix_encoding.fix_encoding()
667 tools.disable_buffering() 669 tools.disable_buffering()
668 colorama.init() 670 colorama.init()
669 sys.exit(main(sys.argv[1:])) 671 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | tests/swarming_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698