summaryrefslogtreecommitdiff
path: root/ctdb/tests
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2016-08-02 14:16:35 +1000
committerStefan Metzmacher <metze@samba.org>2016-08-10 11:24:35 +0200
commitc026a3846648c8f26cf93ee47dc8f15ce61c5be5 (patch)
tree42e66bce82645a23d7d2d6bd5c17298f45a66df6 /ctdb/tests
parenta772738363bdf59a9b25ae961a8219d31025da67 (diff)
downloadsamba-c026a3846648c8f26cf93ee47dc8f15ce61c5be5.tar.gz
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 <amitay@gmail.com> Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit b100d78597959ad314e4f4f6816a8ff14100fb6e)
Diffstat (limited to 'ctdb/tests')
-rw-r--r--ctdb/tests/src/test_options.c3
-rw-r--r--ctdb/tests/src/test_options.h1
2 files changed, 4 insertions, 0 deletions
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;