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

Side by Side Diff: scripts/master/unittests/master_gen_test.py

Issue 1153203003: Update buildbot_tool and builders.pyl templates to remove 'master_type'. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « scripts/master/master_gen.py ('k') | scripts/tools/buildbot_tool.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 Chromium Authors. All rights reserved. 2 # Copyright 2014 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 """Tests for scripts/master/master_gen.py.""" 6 """Tests for scripts/master/master_gen.py."""
7 7
8 import os 8 import os
9 import tempfile 9 import tempfile
10 import unittest 10 import unittest
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 master_gen.PopulateBuildmasterConfig(c, fp.name, _FakeMaster) 77 master_gen.PopulateBuildmasterConfig(c, fp.name, _FakeMaster)
78 78
79 self.assertEqual(len(c['builders']), 1) 79 self.assertEqual(len(c['builders']), 1)
80 self.assertEqual(c['builders'][0]['name'], 'Test Linux') 80 self.assertEqual(c['builders'][0]['name'], 'Test Linux')
81 81
82 self.assertEqual(len(c['change_source']), 1) 82 self.assertEqual(len(c['change_source']), 1)
83 self.assertEqual(len(c['schedulers']), 1) 83 self.assertEqual(len(c['schedulers']), 1)
84 finally: 84 finally:
85 os.remove(fp.name) 85 os.remove(fp.name)
86 86
87 def test_tryserver(self):
Dirk Pranke 2015/05/29 01:55:38 We'll add an equivalent test back in the follow up
88 try:
89 contents = SAMPLE_BUILDERS_PY.replace('waterfall', 'tryserver')
90 fp = tempfile.NamedTemporaryFile(delete=False)
91 fp.write(contents)
92 fp.close()
93
94 c = {}
95 master_gen.PopulateBuildmasterConfig(c, fp.name, _FakeMaster)
96
97 self.assertEqual(len(c['builders']), 1)
98 self.assertEqual(c['builders'][0]['name'], 'Test Linux')
99
100 self.assertEqual(len(c['change_source']), 0)
101 self.assertEqual(len(c['schedulers']), 1)
102 finally:
103 os.remove(fp.name)
104
105 87
106
107 if __name__ == '__main__': 88 if __name__ == '__main__':
108 unittest.TestCase.maxDiff = None 89 unittest.TestCase.maxDiff = None
109 unittest.main() 90 unittest.main()
OLDNEW
« no previous file with comments | « scripts/master/master_gen.py ('k') | scripts/tools/buildbot_tool.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698