1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

pmtest: send valgrind output to var/log/valgrind

This will allow us to detect whether valgrind found any errors while
still preserving pacman's return code for tests.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Andrew Gregory 2014-01-06 15:19:31 -05:00 committed by Allan McRae
parent deaed047fd
commit 19b3ee6d39

View File

@ -220,6 +220,7 @@ class pmtest(object):
cmd.extend(["libtool", "execute", "valgrind", "-q",
"--tool=memcheck", "--leak-check=full",
"--show-reachable=yes",
"--log-file=%s" % os.path.join(self.root, "var/log/valgrind"),
"--suppressions=%s" % suppfile])
cmd.extend([pacman["bin"],
"--config", os.path.join(self.root, util.PACCONF),
@ -231,7 +232,7 @@ class pmtest(object):
if pacman["debug"]:
cmd.append("--debug=%s" % pacman["debug"])
cmd.extend(shlex.split(self.args))
if not (pacman["gdb"] or pacman["valgrind"] or pacman["nolog"]):
if not (pacman["gdb"] or pacman["nolog"]):
output = open(os.path.join(self.root, util.LOGFILE), 'w')
else:
output = None