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>
This commit is contained in:
parent
6dd593c293
commit
7ddc967d7c
1 changed files with 3 additions and 2 deletions
|
@ -37,6 +37,7 @@ class pmtest(object):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.testname = os.path.basename(name).replace('.py', '')
|
self.testname = os.path.basename(name).replace('.py', '')
|
||||||
self.root = root
|
self.root = root
|
||||||
|
self.dbver = 9
|
||||||
self.cachepkgs = True
|
self.cachepkgs = True
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
@ -180,9 +181,9 @@ class pmtest(object):
|
||||||
for pkg in self.db["local"].pkgs:
|
for pkg in self.db["local"].pkgs:
|
||||||
vprint("\tinstalling %s" % pkg.fullname())
|
vprint("\tinstalling %s" % pkg.fullname())
|
||||||
pkg.install_package(self.root)
|
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")
|
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.
|
# Done.
|
||||||
vprint(" Taking a snapshot of the file system")
|
vprint(" Taking a snapshot of the file system")
|
||||||
|
|
Loading…
Add table
Reference in a new issue