| OLD | NEW |
| 1 # Copyright 2014 The LUCI Authors. All rights reserved. | 1 # Copyright 2014 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """Toolset to run multiple Swarming tasks in parallel.""" | 5 """Toolset to run multiple Swarming tasks in parallel.""" |
| 6 | 6 |
| 7 import getpass | 7 import getpass |
| 8 import json | 8 import json |
| 9 import os | 9 import os |
| 10 import optparse | 10 import optparse |
| 11 import subprocess | 11 import subprocess |
| 12 import sys | 12 import sys |
| 13 import tempfile | 13 import tempfile |
| 14 import time | 14 import time |
| 15 | 15 |
| 16 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) | 16 BASE_DIR = os.path.dirname(os.path.abspath( |
| 17 __file__.decode(sys.getfilesystemencoding()))) |
| 17 ROOT_DIR = os.path.dirname(BASE_DIR) | 18 ROOT_DIR = os.path.dirname(BASE_DIR) |
| 18 | 19 |
| 19 sys.path.insert(0, ROOT_DIR) | 20 sys.path.insert(0, ROOT_DIR) |
| 20 | 21 |
| 21 import auth | 22 import auth |
| 22 import isolateserver | 23 import isolateserver |
| 23 from utils import logging_utils | 24 from utils import logging_utils |
| 24 from utils import threading_utils | 25 from utils import threading_utils |
| 25 from utils import tools | 26 from utils import tools |
| 26 | 27 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 options.swarming = options.swarming.rstrip('/') | 185 options.swarming = options.swarming.rstrip('/') |
| 185 if not options.swarming: | 186 if not options.swarming: |
| 186 self.error('--swarming is required.') | 187 self.error('--swarming is required.') |
| 187 auth.process_auth_options(self, options) | 188 auth.process_auth_options(self, options) |
| 188 isolateserver.process_isolate_server_options(self, options, False, True) | 189 isolateserver.process_isolate_server_options(self, options, False, True) |
| 189 options.dimensions = dict(options.dimensions) | 190 options.dimensions = dict(options.dimensions) |
| 190 return options, args | 191 return options, args |
| 191 | 192 |
| 192 def format_description(self, _): | 193 def format_description(self, _): |
| 193 return self.description | 194 return self.description |
| OLD | NEW |