summaryrefslogtreecommitdiffstats
path: root/test/pacman/pmrule.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-29 18:25:56 +0100
committerDan McGee <dan@archlinux.org>2011-01-31 16:37:20 +0100
commit2d5ec02d7c82bdef1a9fb0565dcb67564968a8c0 (patch)
tree901eec5061e18339715393126d9e601a3b9c9f36 /test/pacman/pmrule.py
parented1aef7bc5caac95358c4827f162a845230051a2 (diff)
downloadpacman-2d5ec02d7c82bdef1a9fb0565dcb67564968a8c0.tar.gz
pacman-2d5ec02d7c82bdef1a9fb0565dcb67564968a8c0.tar.xz
pactest: allow checking for cache file existence
This will allow some tests to be added for cache cleaning. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'test/pacman/pmrule.py')
-rwxr-xr-xtest/pacman/pmrule.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py
index 62630457..c68d085e 100755
--- a/test/pacman/pmrule.py
+++ b/test/pacman/pmrule.py
@@ -146,6 +146,13 @@ class pmrule(object):
else:
print "FILE rule '%s' not found" % case
success = -1
+ elif kind == "CACHE":
+ cachedir = os.path.join(test.root, util.PM_CACHEDIR)
+ if case == "EXISTS":
+ pkg = test.findpkg(key, value, allow_local=True)
+ if not pkg or not os.path.isfile(
+ os.path.join(cachedir, pkg.filename())):
+ success = 0
else:
print "Rule kind '%s' not found" % kind
success = -1