1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

pactest: allow running with valgrind from any directory

When using the --valgrind flag with the pactest.py script, the path
to the suppression file relies on the script being called from the
source root directory.  Construct the path from the scripts location
to allow it to be called from directory.

Dan: style cleanup.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2012-09-18 01:29:08 +10:00 committed by Dan McGee
parent c9b31ad622
commit 19b8298ce8

View File

@ -203,9 +203,12 @@ class pmtest(object):
if pacman["gdb"]:
cmd.extend(["libtool", "execute", "gdb", "--args"])
if pacman["valgrind"]:
suppfile = os.path.join(os.path.dirname(__file__),
'..', '..', 'valgrind.supp')
cmd.extend(["libtool", "execute", "valgrind", "-q",
"--tool=memcheck", "--leak-check=full",
"--show-reachable=yes", "--suppressions=%s/valgrind.supp" % os.getcwd()])
"--show-reachable=yes",
"--suppressions=%s" % suppfile])
cmd.extend([pacman["bin"],
"--config", os.path.join(self.root, util.PACCONF),
"--root", self.root,