| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # ex: set syntax=python: | 2 # ex: set syntax=python: |
| 3 | 3 |
| 4 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 4 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
| 6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
| 7 | 7 |
| 8 # Chrome Buildbot slave configuration | 8 # Chrome Buildbot slave configuration |
| 9 | 9 |
| 10 import os | 10 import os |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 import socket | 40 import socket |
| 41 slavename = socket.getfqdn().split('.')[0].lower() | 41 slavename = socket.getfqdn().split('.')[0].lower() |
| 42 | 42 |
| 43 if password is None: | 43 if password is None: |
| 44 msg = '*** No password configured in %s.\n' % repr(__file__) | 44 msg = '*** No password configured in %s.\n' % repr(__file__) |
| 45 sys.stderr.write(msg) | 45 sys.stderr.write(msg) |
| 46 sys.exit(1) | 46 sys.exit(1) |
| 47 | 47 |
| 48 if ActiveMaster is None: | 48 if ActiveMaster is None: |
| 49 ActiveMaster = slave_utils.GetActiveMasterConfig() | 49 ActiveMaster = slave_utils.GetActiveMasterConfig() |
| 50 if not ActiveMaster: |
| 51 sys.stderr.write( |
| 52 '\nCouldn\'t determine the slave type automatically.\n' |
| 53 'Please update buildbot.tac to set ActiveMaster and slavename to the\n' |
| 54 'relevant values.\n\n') |
| 55 sys.exit(1) |
| 50 | 56 |
| 51 if host is None: | 57 if host is None: |
| 52 host = ActiveMaster.master_host | 58 host = ActiveMaster.master_host |
| 53 | 59 |
| 54 if port is None: | 60 if port is None: |
| 55 port = ActiveMaster.slave_port | 61 port = ActiveMaster.slave_port |
| 56 | 62 |
| 57 if basedir is None: | 63 if basedir is None: |
| 58 dir, _file = os.path.split(__file__) | 64 dir, _file = os.path.split(__file__) |
| 59 basedir = os.path.abspath(dir) | 65 basedir = os.path.abspath(dir) |
| 60 | 66 |
| 61 | 67 |
| 62 application = service.Application('buildslave') | 68 application = service.Application('buildslave') |
| 63 s = BuildSlave(host, port, slavename, password, basedir, keepalive, usepty, | 69 s = BuildSlave(host, port, slavename, password, basedir, keepalive, usepty, |
| 64 umask=umask) | 70 umask=umask) |
| 65 s.setServiceParent(application) | 71 s.setServiceParent(application) |
| OLD | NEW |