Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   pactest: allow running with valgrind from any directory (http://www.linux-archive.org/archlinux-pacman-development/704738-pactest-allow-running-valgrind-any-directory.html)

Allan McRae 09-17-2012 03:35 PM

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.

Signed-off-by: Allan McRae <allan@archlinux.org>
---
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


All times are GMT. The time now is 01:02 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.