| OLD | NEW |
| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 'env_vars': {}, | 155 'env_vars': {}, |
| 156 'configurations': [ | 156 'configurations': [ |
| 157 { | 157 { |
| 158 'min_instances': self._shards, | 158 'min_instances': self._shards, |
| 159 'config_name': self._target_platform, | 159 'config_name': self._target_platform, |
| 160 'priority': self.priority, |
| 160 'dimensions': { | 161 'dimensions': { |
| 161 'os': self._target_platform, | 162 'os': self._target_platform, |
| 162 }, | 163 }, |
| 163 }, | 164 }, |
| 164 ], | 165 ], |
| 165 'working_dir': self._working_dir, | 166 'working_dir': self._working_dir, |
| 166 'restart_on_failure': True, | 167 'restart_on_failure': True, |
| 167 'cleanup': 'root', | 168 'cleanup': 'root', |
| 168 'priority': self.priority, | |
| 169 } | 169 } |
| 170 if self._isolate_item: | 170 if self._isolate_item: |
| 171 test_case['data'].append( | 171 test_case['data'].append( |
| 172 [ | 172 [ |
| 173 self.storage.get_fetch_url(self._isolate_item.digest), | 173 self.storage.get_fetch_url(self._isolate_item.digest), |
| 174 'swarm_data.zip', | 174 'swarm_data.zip', |
| 175 ]) | 175 ]) |
| 176 # These flags are googletest specific. | 176 # These flags are googletest specific. |
| 177 if self._test_filter and self._test_filter != '*': | 177 if self._test_filter and self._test_filter != '*': |
| 178 test_case['env_vars']['GTEST_FILTER'] = self._test_filter | 178 test_case['env_vars']['GTEST_FILTER'] = self._test_filter |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 sys.stderr.write(str(e)) | 660 sys.stderr.write(str(e)) |
| 661 sys.stderr.write('\n') | 661 sys.stderr.write('\n') |
| 662 return 1 | 662 return 1 |
| 663 | 663 |
| 664 | 664 |
| 665 if __name__ == '__main__': | 665 if __name__ == '__main__': |
| 666 fix_encoding.fix_encoding() | 666 fix_encoding.fix_encoding() |
| 667 tools.disable_buffering() | 667 tools.disable_buffering() |
| 668 colorama.init() | 668 colorama.init() |
| 669 sys.exit(main(sys.argv[1:])) | 669 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |