summaryrefslogtreecommitdiff
path: root/test/pacman/tests/scriptlet001.py
blob: 6f702eb8f244a538721a4b4f3be10df5e45bc6e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
self.description = "Scriptlet test (pre/post install)"

p1 = pmpkg("dummy")
p1.files = ['etc/dummy.conf']
p1.install['pre_install'] = "echo foobar > pre_install"
p1.install['post_install'] = "echo foobar > post_install"
self.addpkg(p1)

self.args = "-U %s" % p1.filename()

self.addrule("PACMAN_RETCODE=0")
self.addrule("FILE_EXIST=pre_install")
self.addrule("FILE_EXIST=post_install")

fakechroot = util.which("fakechroot")
if not fakechroot:
        self.expectfailure = True