From b100d78597959ad314e4f4f6816a8ff14100fb6e Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 2 Aug 2016 14:16:35 +1000 Subject: [PATCH] ctdb-tests: Add --interactive/-i option to test options parsing code BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109 Pair-programmed-with: Amitay Isaacs Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/tests/src/test_options.c | 3 +++ ctdb/tests/src/test_options.h | 1 + 2 files changed, 4 insertions(+) diff --git a/ctdb/tests/src/test_options.c b/ctdb/tests/src/test_options.c index f330764a1b9..e28dcee2cff 100644 --- a/ctdb/tests/src/test_options.c +++ b/ctdb/tests/src/test_options.c @@ -39,6 +39,8 @@ static struct poptOption options_basic[] = { "Number of cluster nodes" }, { "debug", 'd', POPT_ARG_STRING, &_values.debugstr, 0, "Debug level" }, + { "interactive", 'i', POPT_ARG_NONE, &_values.interactive, 0, + "Interactive output" }, { NULL } }; @@ -69,6 +71,7 @@ static void set_defaults_basic(struct test_options *opts) opts->timelimit = 10; opts->num_nodes = 1; opts->debugstr = "ERR"; + opts->interactive = 0; ctdb_socket = getenv("CTDB_SOCKET"); if (ctdb_socket != NULL) { diff --git a/ctdb/tests/src/test_options.h b/ctdb/tests/src/test_options.h index d299f4b55fe..4874dd2aded 100644 --- a/ctdb/tests/src/test_options.h +++ b/ctdb/tests/src/test_options.h @@ -26,6 +26,7 @@ struct test_options { int timelimit; int num_nodes; const char *debugstr; + int interactive; /* Database options */ const char *dbname; -- 2.47.2