diff options
Diffstat (limited to 'test/pacman/pmtest.py')
-rw-r--r-- | test/pacman/pmtest.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py index 00012ac6..274677d2 100644 --- a/test/pacman/pmtest.py +++ b/test/pacman/pmtest.py @@ -33,12 +33,13 @@ class pmtest(object): """Test object """ - def __init__(self, name, root): + def __init__(self, name, root, config): self.name = name self.testname = os.path.basename(name).replace('.py', '') self.root = root self.dbver = 9 self.cachepkgs = True + self.config = config self.cmd = ["pacman", "--noconfirm", "--config", self.configfile(), "--root", self.rootdir(), @@ -101,6 +102,7 @@ class pmtest(object): self.rules = [] self.files = [] self.expectfailure = False + self.skipall = False if os.path.isfile(self.name): # all tests expect this to be available @@ -201,6 +203,10 @@ class pmtest(object): self.files.append(f) vprint("\t%s" % f.name) + def require_capability(self, cap): + if not self.config[cap]: + self.skipall = "missing capability " + cap + def add_hook(self, name, content): if not name.endswith(".hook"): name = name + ".hook" |