Mercurial > treepkg
annotate test/test_debian.py @ 191:94fb3f3ab58b
When building a subset of tracks, make sure new packages are added to
pbuilder even if the tracks that depend on them are not being built. To
achieve this, the information which tracks are to be built is now stored
as the do_build flag in the individual tracks and not by passing only a
subset of the tracks ot the PackagerGroup. Otherwise the PackagerGroup
would not determine the dependencies correctly.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Wed, 30 Jul 2008 19:23:10 +0000 |
parents | e1c7cd896310 |
children | 86ea689eda5f |
rev | line source |
---|---|
127
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
1 # Copyright (C) 2008 by Intevation GmbH |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
2 # Authors: |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
3 # Bernhard Herzog <bh@intevation.de> |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
4 # |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
5 # This program is free software under the GPL (>=v2) |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
6 # Read the file COPYING coming with the software for details. |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
7 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
8 """Tests for treepkg.debian""" |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
9 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
10 import unittest |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
11 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
12 from filesupport import FileTestMixin |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
13 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
14 from treepkg.debian import DebianControlFile |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
15 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
16 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
17 class TestDebianControlFile(unittest.TestCase, FileTestMixin): |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
18 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
19 control_contents = """\ |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
20 Source: libksba |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
21 Section: libs |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
22 Priority: optional |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
23 Maintainer: Kolab-Konsortium Packager <packaging@kolab-konsortium.de> |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
24 Uploaders: Removed for the test |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
25 Build-Depends: debhelper (>= 4.2), libgpg-error-dev (>= 1.2), bison, autotools-dev, cdbs |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
26 Standards-Version: 3.7.2 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
27 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
28 Package: libksba-dev |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
29 Section: libdevel |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
30 Architecture: any |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
31 Depends: libksba8 (>= ${Source-Version}) |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
32 Replaces: libksba0 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
33 Description: Test description |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
34 Some more text. |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
35 . |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
36 Development library files. |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
37 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
38 Package: libksba8 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
39 Section: libs |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
40 Architecture: any |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
41 Depends: ${shlibs:Depends}, ${misc:Depends} |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
42 Description: Test description |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
43 Some more text. |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
44 . |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
45 Runtime library files. |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
46 """ |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
47 |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
48 def test(self): |
185
e1c7cd896310
Rework test/filesupport.py so that test cases always use their own
Bernhard Herzog <bh@intevation.de>
parents:
127
diff
changeset
|
49 filename = self.create_temp_file("control", self.control_contents) |
127
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
50 parsed = DebianControlFile(filename) |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
51 self.assertEquals(parsed.packages, |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
52 [('libksba-dev', 'any'), ('libksba8', 'any')]) |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
53 self.assertEquals(parsed.build_depends, |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
54 ['debhelper', 'libgpg-error-dev', 'bison', |
e83e96ef12b1
Add treepkg/debian.py and test/test_debian.py with code and tests to
Bernhard Herzog <bh@intevation.de>
parents:
diff
changeset
|
55 'autotools-dev', 'cdbs']) |