ctdb-tests: Allow fake_ctdbd and tool to be run under valgrind in tool tests
authorMartin Schwenke <martin@meltin.net>
Tue, 19 Jul 2016 10:10:10 +0000 (20:10 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 25 Jul 2016 19:29:44 +0000 (21:29 +0200)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/tool/scripts/local.sh

index 1ac8a9a912d3feef435965177ee563293b17a7a6..3ed4054ad8b7a130ef6a482e42e769c8d4997b07 100644 (file)
@@ -19,7 +19,7 @@ define_test ()
        ctdb.*)
            _cmd="${_f#ctdb.}"
            _cmd="${_cmd%.*}" # Strip test number
-           export CTDB="ctdb --socket $ctdbd_socket"
+           export CTDB="$VALGRIND ctdb --socket $ctdbd_socket"
            export CTDB_DEBUGLEVEL=3
            test_args="$_cmd"
            ;;
@@ -46,7 +46,7 @@ setup_ctdbd ()
 {
        debug "Setting up fake ctdbd"
 
-       fake_ctdbd -s "$ctdbd_socket" -p "$ctdbd_pidfile"
+       $VALGRIND fake_ctdbd -s "$ctdbd_socket" -p "$ctdbd_pidfile"
        test_cleanup cleanup_ctdbd
 }