summaryrefslogtreecommitdiff
path: root/source4/torture/smbtorture.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-10-16 23:09:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:21:14 -0500
commitb58deeea692fc28827e249f0fc4a9d39263a4095 (patch)
treeb4e7ddc76fd026977803d4d067dc307e7e9d48e7 /source4/torture/smbtorture.c
parentc2d6fad69bc42c0d7c261282797ca8baf9e9aad2 (diff)
downloadsamba-b58deeea692fc28827e249f0fc4a9d39263a4095.tar.gz
samba-b58deeea692fc28827e249f0fc4a9d39263a4095.tar.bz2
samba-b58deeea692fc28827e249f0fc4a9d39263a4095.zip
r19350: Properly list LOCAL-TALLOC under the "LOCAL" header.
Support directories for subcategories in tests. Several small other fixes. (This used to be commit bde00d97068d559b025ab131ff698a82430d14b3)
Diffstat (limited to 'source4/torture/smbtorture.c')
-rw-r--r--source4/torture/smbtorture.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 3d7a75f8cf..3733d72492 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -43,18 +43,18 @@ static bool run_matching(struct torture_context *torture,
bool ret = true;
if (suite == NULL) {
- struct torture_suite_list *o;
+ struct torture_suite *o;
- for (o = torture_suites; o; o = o->next) {
- if (gen_fnmatch(expr, o->suite->name) == 0) {
+ for (o = torture_root->children; o; o = o->next) {
+ if (gen_fnmatch(expr, o->name) == 0) {
*matched = true;
init_iconv();
- ret &= torture_run_suite(torture, o->suite);
+ ret &= torture_run_suite(torture, o);
continue;
}
ret &= run_matching(torture,
- o->suite->name, expr, o->suite, matched);
+ o->name, expr, o, matched);
}
} else {
char *name;
@@ -99,11 +99,11 @@ static bool run_test(struct torture_context *torture, const char *name)
{
bool ret = true;
bool matched = false;
- struct torture_suite_list *o;
+ struct torture_suite *o;
if (strequal(name, "ALL")) {
- for (o = torture_suites; o; o = o->next) {
- ret &= torture_run_suite(torture, o->suite);
+ for (o = torture_root->children; o; o = o->next) {
+ ret &= torture_run_suite(torture, o);
}
return ret;
}
@@ -160,7 +160,7 @@ static void parse_dns(const char *dns)
static void usage(poptContext pc)
{
- struct torture_suite_list *o;
+ struct torture_suite *o;
struct torture_suite *s;
struct torture_tcase *t;
int i;
@@ -217,24 +217,24 @@ static void usage(poptContext pc)
printf("Tests are:");
- for (o = torture_suites; o; o = o->next) {
- printf("\n%s (%s):\n ", o->suite->description, o->suite->name);
+ for (o = torture_root->children; o; o = o->next) {
+ printf("\n%s (%s):\n ", o->description, o->name);
i = 0;
- for (s = o->suite->children; s; s = s->next) {
- if (i + strlen(o->suite->name) + strlen(s->name) >= (MAX_COLS - 3)) {
+ for (s = o->children; s; s = s->next) {
+ if (i + strlen(o->name) + strlen(s->name) >= (MAX_COLS - 3)) {
printf("\n ");
i = 0;
}
- i+=printf("%s-%s ", o->suite->name, s->name);
+ i+=printf("%s-%s ", o->name, s->name);
}
- for (t = o->suite->testcases; t; t = t->next) {
- if (i + strlen(o->suite->name) + strlen(t->name) >= (MAX_COLS - 3)) {
+ for (t = o->testcases; t; t = t->next) {
+ if (i + strlen(o->name) + strlen(t->name) >= (MAX_COLS - 3)) {
printf("\n ");
i = 0;
}
- i+=printf("%s-%s ", o->suite->name, t->name);
+ i+=printf("%s-%s ", o->name, t->name);
}
if (i) printf("\n");
@@ -532,10 +532,10 @@ const static struct torture_ui_ops quiet_ui_ops = {
subunit_dir = lp_parm_string_list(-1, "torture", "subunitdir", ":");
if (subunit_dir == NULL)
- torture_subunit_load_testsuites(dyn_TORTUREDIR);
+ torture_subunit_load_testsuites(dyn_TORTUREDIR, true, NULL);
else {
for (i = 0; subunit_dir[i]; i++)
- torture_subunit_load_testsuites(subunit_dir[i]);
+ torture_subunit_load_testsuites(subunit_dir[i], true, NULL);
}