summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-06-03 17:08:55 +0200
committerGünther Deschner <gd@samba.org>2010-06-03 18:29:46 +0200
commit9884bf7d5737272db993b0602de85b12c2b4e0ea (patch)
tree351d6bb72fba3e1d9d301f0ff9839fd247db0b95 /source4/torture
parent3eac6335229fabfe3c985d0b206faa5d65ad1ce7 (diff)
downloadsamba-9884bf7d5737272db993b0602de85b12c2b4e0ea.tar.gz
samba-9884bf7d5737272db993b0602de85b12c2b4e0ea.tar.bz2
samba-9884bf7d5737272db993b0602de85b12c2b4e0ea.zip
s4-smbtorture: allow to call single tests from a testcase in a testsuite
directly on the commandline. Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/smbtorture.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index baa9afebb6..d86e8dfe48 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -44,6 +44,7 @@ static bool run_matching(struct torture_context *torture,
bool ret = true;
struct torture_suite *o;
struct torture_tcase *t;
+ struct torture_test *p;
for (o = suite->children; o; o = o->next) {
char *name = NULL;
@@ -71,6 +72,15 @@ static bool run_matching(struct torture_context *torture,
torture->active_testname = name;
ret &= torture_run_tcase(torture, t);
}
+ for (p = t->tests; p; p = p->next) {
+ name = talloc_asprintf(torture, "%s-%s-%s", prefix, t->name, p->name);
+ if (gen_fnmatch(expr, name) == 0) {
+ *matched = true;
+ reload_charcnv(torture->lp_ctx);
+ torture->active_testname = name;
+ ret &= torture_run_test(torture, t, p);
+ }
+ }
}
return ret;