summaryrefslogtreecommitdiffstats
path: root/test/pacman/pmtest.py
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-03-09 17:49:27 +0100
committerAllan McRae <allan@archlinux.org>2013-03-10 00:01:56 +0100
commit43a2f6319455edadf9947d2e0fa9e68ea4e348ae (patch)
tree84d0e738f2a316ea4be14b0044b5fc5456222da4 /test/pacman/pmtest.py
parent2259dff7f34b082d8e43af15228e74cba75580f6 (diff)
downloadpacman-43a2f6319455edadf9947d2e0fa9e68ea4e348ae.tar.gz
pacman-43a2f6319455edadf9947d2e0fa9e68ea4e348ae.tar.xz
pmpkg: add missing directories to test packages
Several tests require complete file lists in order to provide accurate results. These can be non-obvious. Adding missing parent directories helps insure the integrity of tests against human error. Filling in parent directories also allows us to check that file lists are actually valid. There didn't seem to be a good place to do this that was always guaranteed to be run, so this adds a finalize() function to packages that will always be run before the package is actually used to allow for this type of tidying. Fixes FS#30723 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test/pacman/pmtest.py')
-rw-r--r--test/pacman/pmtest.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index 6dc0ee64..2eafe682 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -147,8 +147,11 @@ class pmtest(object):
vprint(" Creating package archives")
for pkg in self.localpkgs:
vprint("\t%s" % os.path.join(util.TMPDIR, pkg.filename()))
+ pkg.finalize()
pkg.makepkg(tmpdir)
for key, value in self.db.iteritems():
+ for pkg in value.pkgs:
+ pkg.finalize()
if key == "local" and not self.createlocalpkgs:
continue
for pkg in value.pkgs: