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.
Signed-off-by: Allan McRae
---
test/pacman/pmtest.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index 1a02686..625dccd 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -205,7 +205,8 @@ def run(self, pacman):
if pacman["valgrind"]:
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" % os.path.join(os.path.dirname( __file__ ), '..', '..', 'valgrind.supp') ])
cmd.extend([pacman["bin"],
"--config", os.path.join(self.root, util.PACCONF),
"--root", self.root,
--
1.7.12