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

Unified Diff: test/slaves_cfg_test.py

Issue 12300004: Build scripts refactor to support multislave (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « slave/run_slave.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/slaves_cfg_test.py
diff --git a/test/slaves_cfg_test.py b/test/slaves_cfg_test.py
index 2cc1cd0ace932efb3a11fc7fa76cf4d53997d087..2f863faa2f4619d656e3d04dd50b36a4c5036534 100755
--- a/test/slaves_cfg_test.py
+++ b/test/slaves_cfg_test.py
@@ -20,19 +20,15 @@ WHITELIST = ['build1-m6']
def main():
status = 0
slaves = {}
- for master in chromium_utils.ListMasters(cue='slaves.cfg'):
- masterbase = os.path.basename(master)
- master_slaves = {}
- execfile(os.path.join(master, 'slaves.cfg'), master_slaves)
- for slave in master_slaves.get('slaves', []):
- hostname = slave.get('hostname', None)
- if hostname and hostname not in WHITELIST:
- masters = slaves.get(hostname, [])
- masters.append(masterbase)
- slaves[hostname] = masters
- if len(masters) > 1:
- print '%s duplicated in masters: %s' % (hostname, ' '.join(masters))
- status = 1
+ for slave in chromium_utils.GetAllSlaves():
+ mastername = slave['mastername']
+ slavename = chromium_utils.EntryToSlaveName(slave)
+ if slavename and slave.get('hostname') not in WHITELIST:
+ slaves.setdefault(slavename, []).append(mastername)
+ for slavename, masters in slaves.iteritems():
+ if len(masters) > 1:
+ print '%s duplicated in masters: %s' % (slavename, ' '.join(masters))
+ status = 1
return status
if __name__ == '__main__':
« no previous file with comments | « slave/run_slave.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698