From: Martin Schwenke Date: Tue, 2 Aug 2016 04:16:35 +0000 (+1000) Subject: ctdb-tests: Add --interactive/-i option to test options parsing code X-Git-Tag: tevent-0.9.30~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b100d78597959ad314e4f4f6816a8ff14100fb6e;p=thirdparty%2Fsamba.git 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 --- 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;