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

Side by Side Diff: slave/run_slave.py

Issue 157073002: Bot update! (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: No need to print message in chromium_util Created 6 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """ Initialize the environment variables and start the buildbot slave. 6 """ Initialize the environment variables and start the buildbot slave.
7 """ 7 """
8 8
9 import os 9 import os
10 import shutil 10 import shutil
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 needs_reboot = True 164 needs_reboot = True
165 self.old_remote_shutdown() 165 self.old_remote_shutdown()
166 else: 166 else:
167 Log('Faking Reboot') 167 Log('Faking Reboot')
168 Bot.new_remote_shutdown = rebooting_remote_shutdown 168 Bot.new_remote_shutdown = rebooting_remote_shutdown
169 Bot.remote_shutdown = Bot.new_remote_shutdown 169 Bot.remote_shutdown = Bot.new_remote_shutdown
170 170
171 Bot.old_remote_setBuilderList = Bot.remote_setBuilderList 171 Bot.old_remote_setBuilderList = Bot.remote_setBuilderList
172 def cleanup(self, wanted): 172 def cleanup(self, wanted):
173 retval = self.old_remote_setBuilderList(wanted) 173 retval = self.old_remote_setBuilderList(wanted)
174 wanted_dirs = sorted(['info', 'cert', '.svn'] + [r[1] for r in wanted]) 174 wanted_dirs = sorted(
175 ['info', 'cert', '.svn', 'cache_dir'] + [r[1] for r in wanted])
175 Log('Wanted directories: %s' % wanted_dirs) 176 Log('Wanted directories: %s' % wanted_dirs)
176 actual_dirs = sorted( 177 actual_dirs = sorted(
177 i for i in os.listdir(self.basedir) 178 i for i in os.listdir(self.basedir)
178 if os.path.isdir(os.path.join(self.basedir, i))) 179 if os.path.isdir(os.path.join(self.basedir, i)))
179 Log('Actual directories: %s' % actual_dirs) 180 Log('Actual directories: %s' % actual_dirs)
180 for d in actual_dirs: 181 for d in actual_dirs:
181 # Delete build.dead directories. 182 # Delete build.dead directories.
182 possible_build_dead = os.path.join(self.basedir, d, 'build.dead') 183 possible_build_dead = os.path.join(self.basedir, d, 'build.dead')
183 if os.path.isdir(possible_build_dead): 184 if os.path.isdir(possible_build_dead):
184 Log('Deleting unwanted directory %s' % possible_build_dead) 185 Log('Deleting unwanted directory %s' % possible_build_dead)
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 if skip_sync_arg not in sys.argv: 494 if skip_sync_arg not in sys.argv:
494 UseBotoPath() 495 UseBotoPath()
495 if subprocess.call([GetGClientPath(), 'sync', '--force']) != 0: 496 if subprocess.call([GetGClientPath(), 'sync', '--force']) != 0:
496 print >> sys.stderr, ( 497 print >> sys.stderr, (
497 '(%s) `gclient sync` failed; proceeding anyway...' % sys.argv[0]) 498 '(%s) `gclient sync` failed; proceeding anyway...' % sys.argv[0])
498 os.execv(sys.executable, [sys.executable] + sys.argv + [skip_sync_arg]) 499 os.execv(sys.executable, [sys.executable] + sys.argv + [skip_sync_arg])
499 500
500 # Remove skip_sync_arg from arg list. Needed because twistd. 501 # Remove skip_sync_arg from arg list. Needed because twistd.
501 sys.argv.remove(skip_sync_arg) 502 sys.argv.remove(skip_sync_arg)
502 main() 503 main()
OLDNEW
« scripts/slave/chromium_commands.py ('K') | « scripts/slave/gclient_safe_revert.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698