[pacman-dev] [PATCH 5/5] pmtest: add memory check to tests with valgrind
Andrew Gregory
andrew.gregory.8 at gmail.com
Mon Jan 6 15:19:34 EST 2014
Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
test/pacman/pmrule.py | 3 +++
test/pacman/pmtest.py | 1 +
2 files changed, 4 insertions(+)
diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py
index ba94ab8..96ecdec 100644
--- a/test/pacman/pmrule.py
+++ b/test/pacman/pmrule.py
@@ -112,6 +112,9 @@ def check(self, test):
if case == "EXIST":
if not os.path.isfile(filename):
success = 0
+ elif case == "EMPTY":
+ if not os.path.getsize(filename) == 0:
+ success = 0
elif case == "MODIFIED":
for f in test.files:
if f.name == key:
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index e780a6d..7079b78 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -224,6 +224,7 @@ def run(self, pacman):
"--child-silent-after-fork=yes",
"--log-file=%s" % os.path.join(self.root, "var/log/valgrind"),
"--suppressions=%s" % suppfile])
+ self.addrule("FILE_EMPTY=var/log/valgrind")
cmd.extend([pacman["bin"],
"--config", os.path.join(self.root, util.PACCONF),
"--root", self.root,
--
1.8.5.2
More information about the pacman-dev
mailing list