Rework fakechroot checking

Do the checks in the tests that need it, and get rid of some of the
cluttered output when it is not available (one line per test run).

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2008-08-31 18:38:23 -05:00
parent ce3d70aa99
commit 927ce2b7a5
3 changed files with 9 additions and 3 deletions

View File

@ -197,9 +197,7 @@ def run(self, pacman):
cmd.append("fakeroot")
fakechroot = which("fakechroot")
if not fakechroot:
print "WARNING: fakechroot not found, scriptlet tests WILL fail!!!"
else:
if fakechroot:
cmd.append("fakechroot")
if pacman["gdb"]:

View File

@ -14,3 +14,7 @@
self.addrule("PACMAN_RETCODE=0")
self.addrule("PACMAN_OUTPUT=" + pre)
self.addrule("PACMAN_OUTPUT=" + post)
fakechroot = which("fakechroot")
if not fakechroot:
self.expectfailure = True

View File

@ -14,3 +14,7 @@
self.addrule("PACMAN_RETCODE=0")
self.addrule("PACMAN_OUTPUT=" + pre)
self.addrule("PACMAN_OUTPUT=" + post)
fakechroot = which("fakechroot")
if not fakechroot:
self.expectfailure = True