Mercurial > treepkg
comparison test/test_readconfig.py @ 387:c1f3be727f9d treepkg-status
renamed new status dir to info because of a naming conflict with status.py
let the user specify a treepkg name in the config
the name is propagated to PackagerGroup
[treepkg]
name: <treepkgname>
becomes:
pg = PackagerGroup(...)
pg.name
author | Bjoern Ricks <bricks@intevation.de> |
---|---|
date | Thu, 08 Jul 2010 10:07:39 +0000 |
parents | 610b7e57f966 |
children | a690fc689f2f |
comparison
equal
deleted
inserted
replaced
386:ffa86312ee81 | 387:c1f3be727f9d |
---|---|
32 handle_dependencies: False | 32 handle_dependencies: False |
33 | 33 |
34 [treepkg] | 34 [treepkg] |
35 instructions_file: %(treepkg_dir)s/instructions | 35 instructions_file: %(treepkg_dir)s/instructions |
36 check_interval: 3600 | 36 check_interval: 3600 |
37 name: testtreepkg | |
37 | 38 |
38 [pkg_simple] | 39 [pkg_simple] |
39 pkg_basename: simple1 | 40 pkg_basename: simple1 |
40 svn_url: svn://example.com/%(name)s/trunk | 41 svn_url: svn://example.com/%(name)s/trunk |
41 base_dir: %(tracks_dir)s/%(name)s | 42 base_dir: %(tracks_dir)s/%(name)s |
80 def test_readconfig(self): | 81 def test_readconfig(self): |
81 config_file = os.path.join(self.directory, "treepkg.cfg") | 82 config_file = os.path.join(self.directory, "treepkg.cfg") |
82 treepkg_opts, packager_opts = read_config(config_file) | 83 treepkg_opts, packager_opts = read_config(config_file) |
83 self.assertEquals(treepkg_opts, | 84 self.assertEquals(treepkg_opts, |
84 dict(instructions_file="/home/builder/mill/instructions", | 85 dict(instructions_file="/home/builder/mill/instructions", |
85 check_interval=3600)) | 86 check_interval=3600, name="testtreepkg")) |
86 self.assertEquals(sorted(packager_opts, | 87 self.assertEquals(sorted(packager_opts, |
87 key=operator.itemgetter("name")), | 88 key=operator.itemgetter("name")), |
88 [ | 89 [ |
89 dict(name="extraargs", | 90 dict(name="extraargs", |
90 base_dir="/home/builder/mill/tracks/extraargs", | 91 base_dir="/home/builder/mill/tracks/extraargs", |
132 svn_url="svn://example.com/simple/trunk", | 133 svn_url="svn://example.com/simple/trunk", |
133 version_template="1.0.svn%(revision)s", | 134 version_template="1.0.svn%(revision)s", |
134 git_url="", | 135 git_url="", |
135 git_branch="", | 136 git_branch="", |
136 builder_cls="PBuilder")]) | 137 builder_cls="PBuilder")]) |
138 | |
139 def main(): | |
140 unittest.main() | |
141 | |
142 if __name__ == "__main__": | |
143 main() |