mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-17 23:05:00 -05:00
19f66083f0
Add the ability to check the permissions and type of a file within the framework of pactest. Two new rules can be used: self.addrule("FILE_TYPE=bin/foo|file") self.addrule("FILE_MODE=bin/bar|644") TODO: add the ability to add different types of files (eg links) via the test package building framework, and add the ability to change the modes on files. Signed-off-by: Dan McGee <dan@archlinux.org>
14 lines
306 B
Python
14 lines
306 B
Python
self.description = "Check the types of default files in a package"
|
|
|
|
p = pmpkg("pkg1")
|
|
p.files = ["bin/foo"
|
|
"bin/bar"]
|
|
self.addpkg(p)
|
|
|
|
self.args = "-U %s" % p.filename()
|
|
|
|
self.addrule("PACMAN_RETCODE=0")
|
|
for f in p.files:
|
|
self.addrule("FILE_TYPE=%s|file" % f)
|
|
self.addrule("FILE_TYPE=bin/|dir")
|