From e58aed25fcc2a4f4ed5b4c167fc8f954c5d471f5 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Fri, 13 Aug 2010 22:30:39 +0300 Subject: s4-drs-test: Make the two DRS test suite a top-level test suites so that test cases gets visible with "smbtorture --list" --- source4/torture/drs/drs_init.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/drs/drs_init.c b/source4/torture/drs/drs_init.c index 6c1f1a071c..e6b1d612f5 100644 --- a/source4/torture/drs/drs_init.c +++ b/source4/torture/drs/drs_init.c @@ -28,30 +28,34 @@ /** * DRSUAPI tests to be executed remotely */ -static struct torture_suite * torture_drs_rpc_suite(TALLOC_CTX *mem_ctx) +static struct torture_suite * torture_drs_rpc_suite(TALLOC_CTX *mem_ctx, + const char *suite_name) { - struct torture_suite *suite = torture_suite_create( - talloc_autofree_context(), - "RPC"); + struct torture_suite *suite = torture_suite_create(mem_ctx, suite_name); torture_drs_rpc_dssync_tcase(suite); torture_drs_rpc_dsintid_tcase(suite); + suite->description = talloc_strdup(suite, + "DRSUAPI RPC Tests Suite"); + return suite; } /** * DRSUAPI tests to be executed remotely */ -static struct torture_suite * torture_drs_unit_suite(TALLOC_CTX *mem_ctx) +static struct torture_suite * torture_drs_unit_suite(TALLOC_CTX *mem_ctx, + const char *suite_name) { - struct torture_suite *suite = torture_suite_create( - talloc_autofree_context(), - "UNIT"); + struct torture_suite *suite = torture_suite_create(mem_ctx, suite_name); torture_drs_unit_prefixmap(suite); torture_drs_unit_schemainfo(suite); + suite->description = talloc_strdup(suite, + "DRSUAPI Unit Tests Suite"); + return suite; } @@ -60,16 +64,17 @@ static struct torture_suite * torture_drs_unit_suite(TALLOC_CTX *mem_ctx) */ NTSTATUS torture_drs_init(void) { - struct torture_suite *suite = torture_suite_create( - talloc_autofree_context(), - "DRS"); + struct torture_suite *suite; + TALLOC_CTX *mem_ctx = talloc_autofree_context(); - torture_suite_add_suite(suite, torture_drs_rpc_suite(suite)); - torture_suite_add_suite(suite, torture_drs_unit_suite(suite)); - - suite->description = talloc_strdup(suite, - "DRSUAPI related tests - Remote and Local"); + /* register RPC related test cases */ + suite = torture_drs_rpc_suite(mem_ctx, "DRS-RPC"); + if (!suite) return NT_STATUS_NO_MEMORY; + torture_register_suite(suite); + /* register DRS Unit test cases */ + suite = torture_drs_unit_suite(mem_ctx, "DRS-UNIT"); + if (!suite) return NT_STATUS_NO_MEMORY; torture_register_suite(suite); return NT_STATUS_OK; -- cgit