From dd4f2191f1dfecbdbc2c8d4f5508b442911861ba Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 7 Nov 2008 15:39:57 +0000 Subject: [PATCH] Add trivial test for lib/cache. --- source4/ntvfs/proxy/lib/cache/config.mk | 8 ++++++++ source4/ntvfs/proxy/lib/cache/tests/cache.c | 2 +- source4/torture/config.mk | 2 +- source4/torture/local/config.mk | 3 ++- source4/torture/local/local.c | 2 ++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/source4/ntvfs/proxy/lib/cache/config.mk b/source4/ntvfs/proxy/lib/cache/config.mk index a499ef67ab5..6a7b17d71a2 100644 --- a/source4/ntvfs/proxy/lib/cache/config.mk +++ b/source4/ntvfs/proxy/lib/cache/config.mk @@ -7,3 +7,11 @@ PUBLIC_DEPENDENCIES = LIBTALLOC ################################################ SMB_PROXY_CACHE_OBJ_FILES = ntvfs/proxy/lib/cache/cache.o + +[SUBSYSTEM::torture_SMB_PROXY_CACHE] +PRIVATE_DEPENDENCIES = SMB_PROXY_CACHE + +torture_SMB_PROXY_CACHE_OBJ_FILES = $(addprefix ntvfs/proxy/lib/cache/tests/, cache.o) + +$(eval $(call proto_header_template,ntvfs/proxy/lib/cache/tests/proto.h,$(torture_SMB_PROXY_CACHE_OBJ_FILES:.o=.c))) + diff --git a/source4/ntvfs/proxy/lib/cache/tests/cache.c b/source4/ntvfs/proxy/lib/cache/tests/cache.c index f0482a92026..635d55c5975 100644 --- a/source4/ntvfs/proxy/lib/cache/tests/cache.c +++ b/source4/ntvfs/proxy/lib/cache/tests/cache.c @@ -19,7 +19,7 @@ #include "includes.h" #include "torture/torture.h" -#include "lib/cache/cache.h" +#include "ntvfs/proxy/lib/cache/cache.h" static bool test_create(struct torture_context *tctx) diff --git a/source4/torture/config.mk b/source4/torture/config.mk index eaff5d5fdab..7957fe35682 100644 --- a/source4/torture/config.mk +++ b/source4/torture/config.mk @@ -168,7 +168,7 @@ $(eval $(call proto_header_template,$(torturesrcdir)/nbench/proto.h,$(TORTURE_NB [MODULE::TORTURE_UNIX] SUBSYSTEM = smbtorture INIT_FUNCTION = torture_unix_init -PRIVATE_DEPENDENCIES = TORTURE_UTIL +PRIVATE_DEPENDENCIES = TORTURE_UTIL SMB_PROXY_CACHE # End MODULE TORTURE_UNIX ################################# diff --git a/source4/torture/local/config.mk b/source4/torture/local/config.mk index 46d5e38e67d..4710e9a683d 100644 --- a/source4/torture/local/config.mk +++ b/source4/torture/local/config.mk @@ -15,7 +15,8 @@ PRIVATE_DEPENDENCIES = \ TORTURE_NDR \ share \ torture_registry \ - PROVISION + PROVISION \ + torture_SMB_PROXY_CACHE # End SUBSYSTEM TORTURE_LOCAL ################################# diff --git a/source4/torture/local/local.c b/source4/torture/local/local.c index 6b38cd6db01..f30e86be966 100644 --- a/source4/torture/local/local.c +++ b/source4/torture/local/local.c @@ -25,6 +25,7 @@ #include "torture/auth/proto.h" #include "../lib/crypto/test_proto.h" #include "lib/registry/tests/proto.h" +#include "ntvfs/proxy/lib/cache/tests/proto.h" /* ignore me */ static struct torture_suite * (*suite_generators[]) (TALLOC_CTX *mem_ctx) = @@ -57,6 +58,7 @@ torture_local_dbspeed, torture_local_credentials, torture_registry, + torture_cache, NULL }; -- 2.11.4.GIT