diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-06-21 17:47:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:09:14 -0500 |
commit | a94f2fc7e77a009ee52636e769970ec621d15f19 (patch) | |
tree | 2aaf50561aa5133616350cd4af7d231a61ce2b6b /source4/torture | |
parent | 1ff99ba12d9603dd527be5b65f883d13beeed18e (diff) | |
download | samba-a94f2fc7e77a009ee52636e769970ec621d15f19.tar.gz samba-a94f2fc7e77a009ee52636e769970ec621d15f19.tar.bz2 samba-a94f2fc7e77a009ee52636e769970ec621d15f19.zip |
r16441: - give old tests a chance to report errors
- display the correct test name
metze
(This used to be commit 7d62b0b7e96222f29dd3cd6066523f517d757620)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/ui.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/torture/ui.c b/source4/torture/ui.c index aca6934c90..81d787b878 100644 --- a/source4/torture/ui.c +++ b/source4/torture/ui.c @@ -162,6 +162,10 @@ static BOOL internal_torture_run_test(struct torture_context *context, context->last_result = TORTURE_OK; ret = test->run(context, !already_setup?data:tcase_data, test->data); + if (!ret) { + context->last_reason = talloc_strdup(context, "..."); + context->last_result = TORTURE_FAIL; + } if (context->ui_ops->test_result) context->ui_ops->test_result(context, context->last_result, @@ -259,8 +263,8 @@ struct torture_tcase *torture_suite_add_simple_tcase( tcase = torture_suite_add_tcase(suite, name); tcase->data = data; - - torture_tcase_add_test(tcase, "Test", simple_tcase_helper, run); + + torture_tcase_add_test(tcase, name, simple_tcase_helper, run); return tcase; } |