annotate test/test_listpackages.py @ 252:2e0b373414b8

Make bin/listpackages.py ignore revisions that have not been built successfully, unless the revision has been explicitly selected. Add a test case for this.
author Bernhard Herzog <bh@intevation.de>
date Tue, 14 Apr 2009 09:41:59 +0000
parents 243f206574cb
children 7d932fac1055
rev   line source
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
1 # Copyright (C) 2009 by Intevation GmbH
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
2 # Authors:
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
3 # Bernhard Herzog <bh@intevation.de>
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
4 #
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
5 # This program is free software under the GPL (>=v2)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
6 # Read the file COPYING coming with the software for details.
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
7
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
8
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
9 import sys
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
10 import os
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
11 import difflib
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
12 import unittest
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
13 from datetime import datetime, timedelta
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
14
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
15 from filesupport import FileTestMixin
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
16
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
17 from treepkg.run import call, capture_output, SubprocessError
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
18 from treepkg.status import RevisionStatus
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
19
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
20
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
21 def package_track_files(track, version, binaries, revisions):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
22 src_templates = ["%s_%s.%%s%s" % (track, version, suffix)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
23 for suffix in [".orig.tar.gz", "-1.diff.gz", "-1.dsc"]]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
24 bin_templates = ["%s_%s.%%s-1_i386.deb" % (basename, version)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
25 for basename in binaries]
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
26
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
27 start_time = datetime.now()
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
28 build_duration = timedelta(minutes=30)
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
29 check_interval = timedelta(minutes=60)
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
30
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
31 package_dirs = []
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
32 for revision in revisions:
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
33 status = RevisionStatus(None)
252
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
34 if len(revision) == 2:
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
35 rev, rules_rev = revision
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
36 status.binary_package_created()
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
37 else:
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
38 rev, rules_rev, status_name = revision
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
39 getattr(status, status_name)()
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
40
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
41 status.start = start_time
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
42 status.stop = start_time + build_duration
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
43 start_time += check_interval
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
44
252
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
45 if status.status.finished and not status.status.error:
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
46 src_files = [(template % (rev,), "") for template in src_templates]
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
47 bin_files = [(template % (rev,), "") for template in bin_templates]
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
48 else:
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
49 src_files = []
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
50 bin_files = []
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
51
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
52 package_dirs.append(("%s-%s" % (rev, rules_rev),
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
53 [("status", "".join(status.serialize())),
252
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
54 ("src", src_files),
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
55 ("binary", bin_files)]))
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
56 return (track,
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
57 [("pkg",
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
58 package_dirs)])
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
59
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
60
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
61 class ListPackagesTest(unittest.TestCase, FileTestMixin):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
62
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
63 treepkg_cfg_template = """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
64 [DEFAULT]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
65 tracks_dir: %(tracksdir)s
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
66 root_cmd: true
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
67 pbuilderrc:
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
68 deb_email: packager@example.com
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
69 deb_fullname: Sample Packager
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
70 debrevision_prefix: treepkg
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
71 handle_dependencies: False
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
72
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
73 [treepkg]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
74 check_interval: 3600
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
75 instructions_file:
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
76
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
77 [pkg_kdepim]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
78 svn_url: svn://anonsvn.kde.org/home/kde/branches/kdepim/enterprise/kdepim
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
79 base_dir: %%(tracks_dir)s/kdepim
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
80 packager_class: recipes.kde_enterprise_3_5.kdepim
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
81
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
82 [pkg_kdepimlibs]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
83 svn_url: svn://anonsvn.kde.org/home/kde/branches/kdepim/enterprise/kdepimlibs
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
84 base_dir: %%(tracks_dir)s/kdepimlibs
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
85 packager_class: recipes.kde_enterprise_3_5.kdepim
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
86 """
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
87
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
88 track_files = []
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
89
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
90 def setUp(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
91 self.bindir = os.path.join(os.path.dirname(__file__),
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
92 os.pardir, "bin")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
93 self.listpackages = os.path.join(self.bindir, "listpackages.py")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
94 self.tracksdir = self.create_files("tracks", self.track_files)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
95 config = self.treepkg_cfg_template % dict(tracksdir=self.tracksdir)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
96 self.config_file = self.create_temp_file("treepkg.cfg", config)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
97 self.base_command = [sys.executable, self.listpackages,
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
98 "--config-file=" + self.config_file]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
99
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
100 def run_command(self, extra_args, expected_exit_code=0):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
101 cmd = self.base_command + list(extra_args)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
102 try:
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
103 output = capture_output(cmd)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
104 except SubprocessError, exc:
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
105 if expected_exit_code != exc.returncode:
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
106 raise
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
107 output = exc.output
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
108 return output
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
109
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
110 def check_cmd(self, args, expected):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
111 expected_lines = [os.path.join(self.tracksdir, filename) + "\n"
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
112 for filename in expected.splitlines()]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
113 try:
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
114 output_lines = [line + "\n"
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
115 for line in self.run_command(args).splitlines()]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
116 except SubprocessError, exc:
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
117 print >>sys.stderr, "Unexpected output:", exc.output
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
118 raise
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
119
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
120 # the order of the listed packages doesn't matter, so sort the
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
121 # lists before comparing them
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
122 expected_lines.sort()
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
123 output_lines.sort()
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
124
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
125 if expected_lines != output_lines:
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
126 diff = difflib.unified_diff(expected_lines, output_lines,
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
127 "expected", "found")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
128 raise self.failureException("\n" + "".join(diff))
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
129
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
130
248
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
131 class TestListPackagesNoPackages(ListPackagesTest):
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
132
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
133 track_files = []
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
134
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
135 def test_listpackages_noargs(self):
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
136 # if nothing has been packaged yet, the output is simply empty
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
137 self.check_cmd(["--source"], "")
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
138
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
139 def test_listpackages_revision(self):
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
140 # if nothing has been packaged yet, the output is simply empty
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
141 self.assertEquals(self.run_command(["--source", "--revision=12345",
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
142 "--track=kdepim"],
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
143 expected_exit_code=1),
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
144 "No revision 12345\n")
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
145
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
146 def test_listpackages_revision_rulesrev(self):
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
147 # if nothing has been packaged yet, the output is simply empty
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
148 self.assertEquals(self.run_command(["--source", "--revision=12345-321",
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
149 "--track=kdepim"],
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
150 expected_exit_code=1),
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
151 "No revision 12345-321\n")
5dd710b167d2 Make bin/listpackages.py handle corner cases like no revisions built or
Bernhard Herzog <bh@intevation.de>
parents: 246
diff changeset
152
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
153 class TestListPackagesTrackNoRevision(ListPackagesTest):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
154
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
155 track_files = [package_track_files("kdepim", "1.0.1",
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
156 ["kdepim", "kleopatra"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
157 [(704195, 31), (702432, 47)])]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
158
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
159 def test_listpackages_source(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
160 self.check_cmd(["--track=kdepim", "--source"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
161 """\
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
162 kdepim/pkg/702432-47/src/kdepim_1.0.1.702432-1.diff.gz
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
163 kdepim/pkg/702432-47/src/kdepim_1.0.1.702432-1.dsc
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
164 kdepim/pkg/702432-47/src/kdepim_1.0.1.702432.orig.tar.gz
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
165 """)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
166
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
167 def test_listpackages_binary(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
168 self.check_cmd(["--track=kdepim", "--binary"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
169 """\
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
170 kdepim/pkg/702432-47/binary/kdepim_1.0.1.702432-1_i386.deb
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
171 kdepim/pkg/702432-47/binary/kleopatra_1.0.1.702432-1_i386.deb
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
172 """)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
173
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
174
252
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
175 class TestListPackagesTrackNoRevisionWithIncompleteBuilds(ListPackagesTest):
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
176
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
177 track_files = [package_track_files("kdepim", "1.0.1",
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
178 ["kdepim", "kleopatra"],
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
179 [(702432, 47),
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
180 (704195, 31, "error")])]
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
181
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
182 def test_listpackages_source(self):
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
183 self.check_cmd(["--track=kdepim", "--source"],
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
184 """\
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
185 kdepim/pkg/702432-47/src/kdepim_1.0.1.702432-1.diff.gz
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
186 kdepim/pkg/702432-47/src/kdepim_1.0.1.702432-1.dsc
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
187 kdepim/pkg/702432-47/src/kdepim_1.0.1.702432.orig.tar.gz
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
188 """)
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
189
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
190 def test_listpackages_binary(self):
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
191 self.check_cmd(["--track=kdepim", "--binary"],
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
192 """\
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
193 kdepim/pkg/702432-47/binary/kdepim_1.0.1.702432-1_i386.deb
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
194 kdepim/pkg/702432-47/binary/kleopatra_1.0.1.702432-1_i386.deb
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
195 """)
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
196
2e0b373414b8 Make bin/listpackages.py ignore revisions that have not been built
Bernhard Herzog <bh@intevation.de>
parents: 251
diff changeset
197
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
198 class TestListPackagesNoTrackNoRevision(ListPackagesTest):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
199
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
200 track_files = [package_track_files("kdepim", "1.0.1",
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
201 ["kdepim", "kleopatra"],
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
202 [(702432, 47),
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
203 (704195, 31)]),
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
204 package_track_files("kdepimlibs", "1.0.1",
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
205 ["kdepimlibs"],
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
206 [(803691, 4321),
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
207 (803692, 4322)]),
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
208 ]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
209
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
210 def test_listpackages_source(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
211 self.check_cmd(["--source"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
212 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
213 kdepim/pkg/704195-31/src/kdepim_1.0.1.704195-1.diff.gz
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
214 kdepim/pkg/704195-31/src/kdepim_1.0.1.704195-1.dsc
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
215 kdepim/pkg/704195-31/src/kdepim_1.0.1.704195.orig.tar.gz
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
216 kdepimlibs/pkg/803692-4322/src/kdepimlibs_1.0.1.803692-1.diff.gz
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
217 kdepimlibs/pkg/803692-4322/src/kdepimlibs_1.0.1.803692-1.dsc
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
218 kdepimlibs/pkg/803692-4322/src/kdepimlibs_1.0.1.803692.orig.tar.gz""")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
219
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
220 def test_listpackages_binary(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
221 self.check_cmd(["--binary"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
222 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
223 kdepim/pkg/704195-31/binary/kdepim_1.0.1.704195-1_i386.deb
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
224 kdepim/pkg/704195-31/binary/kleopatra_1.0.1.704195-1_i386.deb
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
225 kdepimlibs/pkg/803692-4322/binary/kdepimlibs_1.0.1.803692-1_i386.deb""")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
226
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
227
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
228 class TestListPackagesTrackRevision(ListPackagesTest):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
229
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
230 track_files = [package_track_files("kdepim", "1.0.1",
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
231 ["kdepim", "kleopatra"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
232 [(704195, 31), (702432, 47)]),
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
233 package_track_files("kdepimlibs", "1.0.1",
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
234 ["kdepimlibs"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
235 [(803691, 4321), (803692, 4322)]),
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
236 ]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
237
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
238 def test_listpackages_source(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
239 self.check_cmd(["--source", "--track=kdepim", "--revision=702432"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
240 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
241 kdepim/pkg/702432-47/src/kdepim_1.0.1.702432-1.diff.gz
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
242 kdepim/pkg/702432-47/src/kdepim_1.0.1.702432-1.dsc
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
243 kdepim/pkg/702432-47/src/kdepim_1.0.1.702432.orig.tar.gz""")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
244
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
245 def test_listpackages_binary(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
246 self.check_cmd(["--binary", "--track=kdepim", "--revision=702432"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
247 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
248 kdepim/pkg/702432-47/binary/kdepim_1.0.1.702432-1_i386.deb
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
249 kdepim/pkg/702432-47/binary/kleopatra_1.0.1.702432-1_i386.deb""")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
250
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
251
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
252
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
253 class TestListPackagesMultipleRulesRevisions(ListPackagesTest):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
254
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
255 track_files = [package_track_files("kdepim", "1.0.1",
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
256 ["kdepim", "kleopatra"],
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
257 [(702432, 47),
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
258 (704195, 31),
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
259 (704195, 33)]),
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
260 package_track_files("kdepimlibs", "1.0.1",
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
261 ["kdepimlibs"],
251
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
262 [(803691, 4321),
243f206574cb Make bin/listpackages.py prefer the newest packages by start-time, not
Bernhard Herzog <bh@intevation.de>
parents: 248
diff changeset
263 (803692, 4322)]),
246
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
264 ]
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
265
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
266 def test_listpackages_source_no_rev(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
267 self.check_cmd(["--source", "--track=kdepim"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
268 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
269 kdepim/pkg/704195-33/src/kdepim_1.0.1.704195-1.diff.gz
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
270 kdepim/pkg/704195-33/src/kdepim_1.0.1.704195-1.dsc
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
271 kdepim/pkg/704195-33/src/kdepim_1.0.1.704195.orig.tar.gz""")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
272
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
273 def test_listpackages_binary_no_rev(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
274 self.check_cmd(["--binary", "--track=kdepim"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
275 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
276 kdepim/pkg/704195-33/binary/kdepim_1.0.1.704195-1_i386.deb
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
277 kdepim/pkg/704195-33/binary/kleopatra_1.0.1.704195-1_i386.deb""")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
278
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
279 def test_listpackages_source_and_binary_no_rev(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
280 self.check_cmd(["--source", "--track=kdepim", "--binary"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
281 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
282 kdepim/pkg/704195-33/binary/kdepim_1.0.1.704195-1_i386.deb
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
283 kdepim/pkg/704195-33/binary/kleopatra_1.0.1.704195-1_i386.deb
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
284 kdepim/pkg/704195-33/src/kdepim_1.0.1.704195-1.diff.gz
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
285 kdepim/pkg/704195-33/src/kdepim_1.0.1.704195-1.dsc
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
286 kdepim/pkg/704195-33/src/kdepim_1.0.1.704195.orig.tar.gz
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
287 """)
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
288
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
289 def test_listpackages_source_no_rulesrev(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
290 self.check_cmd(["--source", "--track=kdepim", "--revision=704195"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
291 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
292 kdepim/pkg/704195-33/src/kdepim_1.0.1.704195-1.diff.gz
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
293 kdepim/pkg/704195-33/src/kdepim_1.0.1.704195-1.dsc
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
294 kdepim/pkg/704195-33/src/kdepim_1.0.1.704195.orig.tar.gz""")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
295
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
296 def test_listpackages_binary_no_rulesrev(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
297 self.check_cmd(["--binary", "--track=kdepim", "--revision=704195"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
298 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
299 kdepim/pkg/704195-33/binary/kdepim_1.0.1.704195-1_i386.deb
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
300 kdepim/pkg/704195-33/binary/kleopatra_1.0.1.704195-1_i386.deb""")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
301
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
302 def test_listpackages_source_rulesrev(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
303 self.check_cmd(["--source", "--track=kdepim", "--revision=704195-31"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
304 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
305 kdepim/pkg/704195-31/src/kdepim_1.0.1.704195-1.diff.gz
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
306 kdepim/pkg/704195-31/src/kdepim_1.0.1.704195-1.dsc
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
307 kdepim/pkg/704195-31/src/kdepim_1.0.1.704195.orig.tar.gz""")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
308
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
309 def test_listpackages_binary_rulesrev(self):
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
310 self.check_cmd(["--binary", "--track=kdepim", "--revision=704195-31"],
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
311 """\
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
312 kdepim/pkg/704195-31/binary/kdepim_1.0.1.704195-1_i386.deb
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
313 kdepim/pkg/704195-31/binary/kleopatra_1.0.1.704195-1_i386.deb""")
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
314
59e2d8e26635 Extend --revision parameter of bin/listpackages.py to accept rules revision too.
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
315
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)