tests: add function for valgrind wrapper creation

I used it for d9814c7 and bffd87b
This commit is contained in:
Evgeny Vereshchagin 2016-01-15 02:52:12 +00:00
parent bffd87bb12
commit cb2f9d3f29

View File

@ -138,6 +138,17 @@ install_valgrind() {
dracut_install $_valgrind_dbg_and_supp
}
create_valgrind_wrapper() {
local _valgrind_wrapper=$initdir/$ROOTLIBDIR/systemd-under-valgrind
ddebug "Create $_valgrind_wrapper"
cat >$_valgrind_wrapper <<EOF
#!/bin/bash
exec valgrind --leak-check=full --log-file=/valgrind.out $ROOTLIBDIR/systemd "\$@"
EOF
chmod 0755 $_valgrind_wrapper
}
install_dmevent() {
instmods dm_crypt =crypto
type -P dmeventd >/dev/null && dracut_install dmeventd