Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=0881d26191f73a7c16b083c9133a34d6025b7cc4

commit 0881d26191f73a7c16b083c9133a34d6025b7cc4
Author: Michel Hermier <[email protected]>
Date:   Tue Jan 15 20:51:59 2013 +0100

pactest

* Fix invocation of invocation with gdb and valgrind.
* Add check-gdb and check-valgrind build target, to run checks under
gdb and valgrind.

diff --git a/Makefile.am b/Makefile.am
index db7640c..1a07e0d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,3 +26,10 @@ EXTRA_DIST =         \

check:
python $(top_srcdir)/pactest/pactest.py --test=$(top_srcdir)/pactest/tests/*.py 
-p $(top_builddir)/src/pacman-g2/pacman-g2 --debug=-1
+
+check-gdb:
+       python $(top_srcdir)/pactest/pactest.py 
--test=$(top_srcdir)/pactest/tests/*.py -p 
$(top_builddir)/src/pacman-g2/pacman-g2 --debug=-1 --gdb
+
+check-valgrind:
+       python $(top_srcdir)/pactest/pactest.py 
--test=$(top_srcdir)/pactest/tests/*.py -p 
$(top_builddir)/src/pacman-g2/pacman-g2 --debug=-1 --valgrind
+
diff --git a/pactest/pmtest.py b/pactest/pmtest.py
index 2137ec9..2b03d73 100644
--- a/pactest/pmtest.py
+++ b/pactest/pmtest.py
@@ -190,11 +190,13 @@ class pmtest:
else:
cmd = ["fakeroot"]
if pacman["gdb"]:
-                       cmd.append("libtool gdb --args")
+                       cmd.append("libtool --mode=execute gdb --args")
if pacman["valgrind"]:
-                       cmd.append("valgrind --tool=memcheck --leak-check=full 
--show-reachable=yes")
+                       cmd.append("libtool --mode=execute valgrind 
--tool=memcheck --leak-check=full --show-reachable=yes")
+
cmd.append("%s --noconfirm --config=%s --root=%s" \
% (pacman["bin"], os.path.join(self.root, PACCONF), self.root))
+
if pacman["debug"]:
cmd.append("--debug=%s" % pacman["debug"])
cmd.append("%s" % self.args)
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to