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

Side by Side Diff: client/tools/run_on_bots.py

Issue 2093593002: luci-py: Making __file__ usage unicode safe. (Closed) Base URL: https://github.com/luci/luci-py.git@master
Patch Set: Small fixes. Created 4 years, 5 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
« no previous file with comments | « client/tools/parallel_execution.py ('k') | client/tools/run_swarming_tests_on_swarming.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 2014 The LUCI Authors. All rights reserved. 2 # Copyright 2014 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 """Automated maintenance tool to run a script on bots. 6 """Automated maintenance tool to run a script on bots.
7 7
8 To use this script, write a self-contained python script (use a .zip if 8 To use this script, write a self-contained python script (use a .zip if
9 necessary), specify it on the command line and it will be packaged and triggered 9 necessary), specify it on the command line and it will be packaged and triggered
10 on all the swarming bots corresponding to the --dimension filters specified, or 10 on all the swarming bots corresponding to the --dimension filters specified, or
11 all the bots if no filter is specified. 11 all the bots if no filter is specified.
12 """ 12 """
13 13
14 __version__ = '0.1' 14 __version__ = '0.1'
15 15
16 import os 16 import os
17 import tempfile 17 import tempfile
18 import shutil 18 import shutil
19 import subprocess 19 import subprocess
20 import sys 20 import sys
21 21
22 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 22 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(
23 __file__.decode(sys.getfilesystemencoding()))))
23 24
24 # Must be first import. 25 # Must be first import.
25 import parallel_execution 26 import parallel_execution
26 27
27 from third_party import colorama 28 from third_party import colorama
28 from third_party.depot_tools import fix_encoding 29 from third_party.depot_tools import fix_encoding
29 from utils import file_path 30 from utils import file_path
30 from utils import tools 31 from utils import tools
31 32
32 33
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 isolated_hash, 182 isolated_hash,
182 name, 183 name,
183 bots) 184 bots)
184 185
185 186
186 if __name__ == '__main__': 187 if __name__ == '__main__':
187 fix_encoding.fix_encoding() 188 fix_encoding.fix_encoding()
188 tools.disable_buffering() 189 tools.disable_buffering()
189 colorama.init() 190 colorama.init()
190 sys.exit(main()) 191 sys.exit(main())
OLDNEW
« no previous file with comments | « client/tools/parallel_execution.py ('k') | client/tools/run_swarming_tests_on_swarming.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698