summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-12-09 16:57:45 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-12-10 03:04:06 +0100
commit365cfb1c323cd3a24ff0caf1929674910095b4c6 (patch)
tree5a462943aa27bd0636c333a4d5b21ad478e488d2 /source4
parent5f6dd9a608271948bb1d4a1fb975e889db70512c (diff)
downloadsamba-365cfb1c323cd3a24ff0caf1929674910095b4c6.tar.gz
samba-365cfb1c323cd3a24ff0caf1929674910095b4c6.tar.bz2
samba-365cfb1c323cd3a24ff0caf1929674910095b4c6.zip
smbtorture: Rename --list to --list-suites, add stub --list.
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/selftest/tests.py2
-rw-r--r--source4/torture/shell.c2
-rw-r--r--source4/torture/smbtorture.c21
-rw-r--r--source4/torture/smbtorture.h2
4 files changed, 14 insertions, 13 deletions
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index eb8fd8e90f..f855c02b0e 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -134,7 +134,7 @@ samba4srcdir = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__f
builddir = os.getenv("BUILDDIR", samba4srcdir)
samba4bindir = os.path.normpath(os.path.join(builddir, "bin"))
smb4torture = binpath("smbtorture")
-smb4torture_testsuite_list = subprocess.Popen([smb4torture, "--list"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate("")[0].splitlines()
+smb4torture_testsuite_list = subprocess.Popen([smb4torture, "--list-suites"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate("")[0].splitlines()
validate = os.getenv("VALIDATE", "")
if validate:
validate_list = [validate]
diff --git a/source4/torture/shell.c b/source4/torture/shell.c
index 4c098a9748..d6cc94c665 100644
--- a/source4/torture/shell.c
+++ b/source4/torture/shell.c
@@ -215,7 +215,7 @@ static void shell_list(const struct shell_command * command,
return;
}
- torture_print_tests(true);
+ torture_print_testsuites(true);
}
static void shell_auth(const struct shell_command * command,
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 36b8c0f377..dec97d22f6 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -190,7 +190,7 @@ static void parse_dns(struct loadparm_context *lp_ctx, const char *dns)
/* Print the full test list, formatted into separate labelled test
* groups.
*/
-static void print_structured_test_list(void)
+static void print_structured_testsuite_list(void)
{
struct torture_suite *o;
struct torture_suite *s;
@@ -228,7 +228,7 @@ static void print_structured_test_list(void)
printf("\nThe default test is ALL.\n");
}
-static void print_test_list(void)
+static void print_testsuite_list(void)
{
struct torture_suite *o;
struct torture_suite *s;
@@ -248,12 +248,12 @@ static void print_test_list(void)
}
}
-void torture_print_tests(bool structured)
+void torture_print_testsuites(bool structured)
{
if (structured) {
- print_structured_test_list();
+ print_structured_testsuite_list();
} else {
- print_test_list();
+ print_testsuite_list();
}
}
@@ -311,7 +311,7 @@ _NORETURN_ static void usage(poptContext pc)
printf("Tests are:");
- print_structured_test_list();
+ print_structured_testsuite_list();
exit(1);
}
@@ -406,7 +406,7 @@ int main(int argc,char *argv[])
const char *basedir = NULL;
char *outputdir;
const char *extra_module = NULL;
- static int list_tests = 0;
+ static int list_tests = 0, list_testsuites = 0;
int num_extra_users = 0;
char **restricted = NULL;
int num_restricted = -1;
@@ -425,7 +425,8 @@ int main(int argc,char *argv[])
{"num-ops", 0, POPT_ARG_INT, &torture_numops, 0, "num ops", NULL},
{"entries", 0, POPT_ARG_INT, &torture_entries, 0, "entries", NULL},
{"loadfile", 0, POPT_ARG_STRING, NULL, OPT_LOADFILE, "NBench load file to use", NULL},
- {"list", 0, POPT_ARG_NONE, &list_tests, 0, "List available tests and exit", NULL },
+ {"list-suites", 0, POPT_ARG_NONE, &list_testsuites, 0, "List available testsuites and exit", NULL },
+ {"list", 0, POPT_ARG_NONE, &list_tests, 0, "List available tests in specified suites and exit", NULL },
{"unclist", 0, POPT_ARG_STRING, NULL, OPT_UNCLIST, "unclist", NULL},
{"timelimit", 't', POPT_ARG_INT, NULL, OPT_TIMELIMIT, "Set time limit (in seconds)", NULL},
{"failures", 'f', POPT_ARG_INT, &torture_failures, 0, "failures", NULL},
@@ -588,8 +589,8 @@ int main(int argc,char *argv[])
torture_init();
}
- if (list_tests) {
- print_test_list();
+ if (list_testsuites) {
+ print_testsuite_list();
return 0;
}
diff --git a/source4/torture/smbtorture.h b/source4/torture/smbtorture.h
index 8ad58bf71c..cbb48234e3 100644
--- a/source4/torture/smbtorture.h
+++ b/source4/torture/smbtorture.h
@@ -37,7 +37,7 @@ struct torture_test;
int torture_init(void);
bool torture_register_suite(struct torture_suite *suite);
void torture_shell(struct torture_context *tctx);
-void torture_print_tests(bool structured);
+void torture_print_testsuites(bool structured);
bool torture_run_named_tests(struct torture_context *torture, const char *name,
const char **restricted);
bool torture_parse_target(struct loadparm_context *lp_ctx, const char *target);