1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r19537: Report correct test names when tests failed.

(This used to be commit 7b93b3c8be)
This commit is contained in:
Jelmer Vernooij 2006-11-02 22:17:11 +00:00 committed by Gerald (Jerry) Carter
parent 5028a9266d
commit d8cd73563e
2 changed files with 6 additions and 1 deletions

View File

@ -64,10 +64,13 @@ static bool run_matching(struct torture_context *torture,
for (c = suite->children; c; c = c->next) {
asprintf(&name, "%s-%s", prefix, c->name);
if (gen_fnmatch(expr, name) == 0) {
*matched = true;
init_iconv();
torture->active_testname = talloc_strdup(torture, prefix);
ret &= torture_run_suite(torture, c);
talloc_free(torture);
free(name);
continue;
}
@ -82,7 +85,9 @@ static bool run_matching(struct torture_context *torture,
if (gen_fnmatch(expr, name) == 0) {
*matched = true;
init_iconv();
torture->active_testname = talloc_strdup(torture, prefix);
ret &= torture_run_tcase(torture, t);
talloc_free(torture->active_testname);
}
free(name);
}

View File

@ -135,7 +135,7 @@ BOOL torture_run_suite(struct torture_context *context,
context->ui_ops->suite_start(context, suite);
old_testname = context->active_testname;
if (context->active_testname)
if (old_testname != NULL)
context->active_testname = talloc_asprintf(context, "%s-%s",
old_testname, suite->name);
else