1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

ctdb-tests: Support CTDB_DEBUGLEVEL in tool tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2015-02-04 14:56:17 +11:00 committed by Amitay Isaacs
parent dae6a7c4ba
commit a68df0a06d
2 changed files with 10 additions and 0 deletions

View File

@ -355,6 +355,13 @@ static bool current_node_is_connected (struct ctdb_context *ctdb)
struct ctdb_context *ctdb_cmdline_client_stub(struct tevent_context *ev,
struct timeval req_timeout)
{
const char *t = getenv("CTDB_DEBUGLEVEL");
if (t != NULL) {
DEBUGLEVEL= atoi(t);
} else {
DEBUGLEVEL = 0;
}
return ctdb_global;
}

View File

@ -55,6 +55,9 @@ setup_nodes ()
simple_test ()
{
: ${CTDB_DEBUGLEVEL:=3}
export CTDB_DEBUGLEVEL
_out=$($VALGRIND $test_prog "$@" 2>&1)
result_check