mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
pmtest: add memory check to tests with valgrind
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
4763341ea1
commit
953808a9ee
@ -62,6 +62,11 @@ This example will run all tests from the "tests" directory.
|
|||||||
Use the "help" option to get the full list of parameters:
|
Use the "help" option to get the full list of parameters:
|
||||||
./pactest.py --help
|
./pactest.py --help
|
||||||
|
|
||||||
|
When run with the `--valgrind' option, an additional rule will be added to all
|
||||||
|
tests to check for memory leaks. To use `--valgrind' when running the full
|
||||||
|
test suite, run:
|
||||||
|
make PY_LOG_FLAGS=--valgrind check
|
||||||
|
|
||||||
The following pieces of software are required to run the pactest suite:
|
The following pieces of software are required to run the pactest suite:
|
||||||
|
|
||||||
fakeroot (required to run as non-root user)
|
fakeroot (required to run as non-root user)
|
||||||
|
@ -224,6 +224,7 @@ class pmtest(object):
|
|||||||
"--child-silent-after-fork=yes",
|
"--child-silent-after-fork=yes",
|
||||||
"--log-file=%s" % os.path.join(self.root, "var/log/valgrind"),
|
"--log-file=%s" % os.path.join(self.root, "var/log/valgrind"),
|
||||||
"--suppressions=%s" % suppfile])
|
"--suppressions=%s" % suppfile])
|
||||||
|
self.addrule("FILE_EMPTY=var/log/valgrind")
|
||||||
cmd.extend([pacman["bin"],
|
cmd.extend([pacman["bin"],
|
||||||
"--config", os.path.join(self.root, util.PACCONF),
|
"--config", os.path.join(self.root, util.PACCONF),
|
||||||
"--root", self.root,
|
"--root", self.root,
|
||||||
|
Loading…
Reference in New Issue
Block a user