summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-10-06 03:01:08 -0400
committerAllan McRae <allan@archlinux.org>2014-10-13 12:54:29 +1000
commit7ddc967d7cf2b8de73095cb841ee2c5973a669e4 (patch)
tree290b4312ed7fcc1d3be1ac3dc5584ede42f6b2af /test
parent6dd593c293bdc808b5e7040d06657c4f89e1a8bd (diff)
downloadpacman-7ddc967d7cf2b8de73095cb841ee2c5973a669e4.tar.xz
pmtest: allow tests to specify db version
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/pmtest.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index 09baac7a..7ed30eb9 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -37,6 +37,7 @@ class pmtest(object):
self.name = name
self.testname = os.path.basename(name).replace('.py', '')
self.root = root
+ self.dbver = 9
self.cachepkgs = True
def __str__(self):
@@ -180,9 +181,9 @@ class pmtest(object):
for pkg in self.db["local"].pkgs:
vprint("\tinstalling %s" % pkg.fullname())
pkg.install_package(self.root)
- if self.db["local"].pkgs:
+ if self.db["local"].pkgs and self.dbver >= 9:
path = os.path.join(self.root, util.PM_DBPATH, "local")
- util.mkfile(path, "ALPM_DB_VERSION", "9")
+ util.mkfile(path, "ALPM_DB_VERSION", str(self.dbver))
# Done.
vprint(" Taking a snapshot of the file system")