summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2016-01-15 02:52:12 +0000
committerEvgeny Vereshchagin <evvers@ya.ru>2016-01-15 02:53:47 +0000
commitcb2f9d3f296bc80b55f09880d61dfdf47fc98212 (patch)
tree52a78ea11cc8226497a44112c10a2dcc227f1938 /test
parentbffd87bb1268d90f4261491a6d81814262f62bf6 (diff)
tests: add function for valgrind wrapper creation
I used it for d9814c7 and bffd87b
Diffstat (limited to 'test')
-rw-r--r--test/test-functions11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test-functions b/test/test-functions
index 80d048c0d2..03753db38a 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -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