diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-27 14:02:46 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-27 14:02:46 +0100 |
commit | 1e973565b6c0cb738b25a2d9439d5acb441701f4 (patch) | |
tree | b5e2144426df4b44ef17a9a3e66a4f8295faedf3 /source4 | |
parent | 240d959005f5fd80a38b3734b39dd5d6e425a566 (diff) | |
download | samba-1e973565b6c0cb738b25a2d9439d5acb441701f4.tar.gz samba-1e973565b6c0cb738b25a2d9439d5acb441701f4.tar.bz2 samba-1e973565b6c0cb738b25a2d9439d5acb441701f4.zip |
Move subunit infrastructure code into lib/torture.
(This used to be commit 5b44d8121de7735d69e6238a1442aff034a8ebd3)
Diffstat (limited to 'source4')
31 files changed, 45 insertions, 48 deletions
diff --git a/source4/lib/basic.mk b/source4/lib/basic.mk index 71acb94492..e7e0ba80c4 100644 --- a/source4/lib/basic.mk +++ b/source4/lib/basic.mk @@ -16,6 +16,7 @@ mkinclude util/config.mk mkinclude tdr/config.mk mkinclude dbwrap/config.mk mkinclude crypto/config.mk +mkinclude torture/config.mk [SUBSYSTEM::LIBCOMPRESSION] diff --git a/source4/lib/crypto/sha1test.c b/source4/lib/crypto/sha1test.c index 0e943bd74d..7777764277 100644 --- a/source4/lib/crypto/sha1test.c +++ b/source4/lib/crypto/sha1test.c @@ -17,7 +17,7 @@ */ #include "includes.h" -#include "torture/ui.h" +#include "torture/torture.h" #include "lib/crypto/crypto.h" diff --git a/source4/lib/torture/config.mk b/source4/lib/torture/config.mk new file mode 100644 index 0000000000..e981ee0c99 --- /dev/null +++ b/source4/lib/torture/config.mk @@ -0,0 +1,11 @@ +# TORTURE subsystem +[LIBRARY::torture] +PUBLIC_DEPENDENCIES = \ + LIBSAMBA-HOSTCONFIG \ + LIBSAMBA-UTIL \ + LIBTALLOC + +PC_FILES += lib/torture/torture.pc +torture_OBJ_FILES = $(addprefix lib/torture/, torture.o) + +PUBLIC_HEADERS += lib/torture/torture.h diff --git a/source4/torture/ui.c b/source4/lib/torture/torture.c index abbd814747..3f2c7848aa 100644 --- a/source4/torture/ui.c +++ b/source4/lib/torture/torture.c @@ -19,7 +19,6 @@ */ #include "includes.h" -#include "torture/ui.h" #include "torture/torture.h" #include "lib/util/dlinklist.h" #include "param/param.h" diff --git a/source4/torture/ui.h b/source4/lib/torture/torture.h index 15b04c2397..15b04c2397 100644 --- a/source4/torture/ui.h +++ b/source4/lib/torture/torture.h diff --git a/source4/lib/util/tests/str.c b/source4/lib/util/tests/str.c index a219ef0891..3bd6a02fdc 100644 --- a/source4/lib/util/tests/str.c +++ b/source4/lib/util/tests/str.c @@ -20,7 +20,7 @@ */ #include "includes.h" -#include "torture/ui.h" +#include "torture/torture.h" static bool test_string_sub_simple(struct torture_context *tctx) { diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index 966d436935..2ab3f9ca91 100644 --- a/source4/torture/basic/base.c +++ b/source4/torture/basic/base.c @@ -19,7 +19,7 @@ */ #include "includes.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "torture/basic/proto.h" #include "libcli/libcli.h" #include "libcli/raw/raw_proto.h" diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c index 2e2585b976..3f399c97ef 100644 --- a/source4/torture/basic/locking.c +++ b/source4/torture/basic/locking.c @@ -23,9 +23,8 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" #include "libcli/libcli.h" -#include "torture/ui.h" +#include "torture/smbtorture.h" #include "torture/util.h" -#include "torture/torture.h" #include "system/time.h" #include "system/filesys.h" diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c index 188fc1bc69..24e0324bc3 100644 --- a/source4/torture/basic/misc.c +++ b/source4/torture/basic/misc.c @@ -30,7 +30,7 @@ #include "libcli/resolve/resolve.h" #include "auth/credentials/credentials.h" #include "librpc/gen_ndr/ndr_nbt.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "torture/util.h" #include "libcli/smb_composite/smb_composite.h" #include "libcli/composite/composite.h" diff --git a/source4/torture/config.mk b/source4/torture/config.mk index 1565797609..40f6bbf1ed 100644 --- a/source4/torture/config.mk +++ b/source4/torture/config.mk @@ -1,17 +1,3 @@ -# TORTURE subsystem -[LIBRARY::torture] -PRIVATE_PROTO_HEADER = proto.h -PUBLIC_DEPENDENCIES = \ - LIBSAMBA-HOSTCONFIG \ - LIBSAMBA-UTIL \ - LIBTALLOC \ - LIBPOPT - -PC_FILES += torture/torture.pc -torture_OBJ_FILES = $(addprefix torture/, torture.o ui.o) - -PUBLIC_HEADERS += torture/torture.h torture/ui.h - [SUBSYSTEM::TORTURE_UTIL] PRIVATE_DEPENDENCIES = LIBCLI_RAW LIBPYTHON smbcalls PROVISION PUBLIC_DEPENDENCIES = POPT_CREDENTIALS @@ -255,8 +241,9 @@ PRIVATE_DEPENDENCIES = \ # End BINARY smbtorture ################################# -smbtorture_OBJ_FILES = torture/smbtorture.o +smbtorture_OBJ_FILES = torture/smbtorture.o torture/torture.o +PUBLIC_HEADERS += torture/smbtorture.h MANPAGES += torture/man/smbtorture.1 ################################# diff --git a/source4/torture/ldap/common.c b/source4/torture/ldap/common.c index 5913163822..2c11de729c 100644 --- a/source4/torture/ldap/common.c +++ b/source4/torture/ldap/common.c @@ -22,7 +22,7 @@ #include "includes.h" #include "libcli/ldap/ldap_client.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "torture/ldap/proto.h" NTSTATUS torture_ldap_bind(struct ldap_connection *conn, const char *userdn, const char *password) diff --git a/source4/torture/libnet/libnet.c b/source4/torture/libnet/libnet.c index 3a75ffcae3..8c8353e8d6 100644 --- a/source4/torture/libnet/libnet.c +++ b/source4/torture/libnet/libnet.c @@ -18,7 +18,7 @@ */ #include "includes.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "librpc/rpc/dcerpc.h" #include "librpc/gen_ndr/security.h" #include "librpc/gen_ndr/lsa.h" diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c index bf88c00e35..017c8568f4 100644 --- a/source4/torture/local/dbspeed.c +++ b/source4/torture/local/dbspeed.c @@ -26,7 +26,7 @@ #include "lib/ldb/include/ldb_errors.h" #include "lib/ldb_wrap.h" #include "lib/tdb_wrap.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "param/param.h" float tdb_speed; diff --git a/source4/torture/local/local.c b/source4/torture/local/local.c index e4dfadd3d1..1c3274adcd 100644 --- a/source4/torture/local/local.c +++ b/source4/torture/local/local.c @@ -18,7 +18,7 @@ */ #include "includes.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "torture/local/proto.h" #include "torture/ndr/ndr.h" #include "torture/ndr/proto.h" diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c index e9bd32cce0..96144c4773 100644 --- a/source4/torture/nbench/nbench.c +++ b/source4/torture/nbench/nbench.c @@ -19,9 +19,8 @@ #include "includes.h" #include "libcli/libcli.h" -#include "torture/ui.h" #include "torture/util.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "system/filesys.h" #include "system/locale.h" #include "pstring.h" diff --git a/source4/torture/nbt/nbt.c b/source4/torture/nbt/nbt.c index d27a26eb30..422261884f 100644 --- a/source4/torture/nbt/nbt.c +++ b/source4/torture/nbt/nbt.c @@ -21,7 +21,7 @@ #include "libcli/nbt/libnbt.h" #include "torture/torture.h" #include "torture/nbt/proto.h" -#include "torture/ui.h" +#include "torture/smbtorture.h" #include "libcli/resolve/resolve.h" #include "param/param.h" diff --git a/source4/torture/ndr/ndr.c b/source4/torture/ndr/ndr.c index 55b00d1fb8..63636f8c5f 100644 --- a/source4/torture/ndr/ndr.c +++ b/source4/torture/ndr/ndr.c @@ -21,7 +21,7 @@ #include "includes.h" #include "torture/ndr/ndr.h" #include "torture/ndr/proto.h" -#include "torture/ui.h" +#include "torture/torture.h" #include "util/dlinklist.h" #include "param/param.h" diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c index 4b5f4b582c..1ccd1254dd 100644 --- a/source4/torture/rap/rap.c +++ b/source4/torture/rap/rap.c @@ -21,7 +21,7 @@ #include "includes.h" #include "libcli/libcli.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "torture/util.h" #include "libcli/rap/rap.h" #include "libcli/raw/libcliraw.h" diff --git a/source4/torture/raw/lookuprate.c b/source4/torture/raw/lookuprate.c index 0e8f002efb..782cb1b31b 100644 --- a/source4/torture/raw/lookuprate.c +++ b/source4/torture/raw/lookuprate.c @@ -20,7 +20,7 @@ #include "includes.h" #include "param/param.h" #include "system/filesys.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "torture/basic/proto.h" #include "libcli/libcli.h" #include "torture/util.h" diff --git a/source4/torture/raw/raw.c b/source4/torture/raw/raw.c index 262ed1384b..c6133081b0 100644 --- a/source4/torture/raw/raw.c +++ b/source4/torture/raw/raw.c @@ -18,10 +18,10 @@ */ #include "includes.h" -#include "torture/torture.h" #include "libcli/raw/libcliraw.h" -#include "torture/raw/proto.h" #include "torture/util.h" +#include "torture/smbtorture.h" +#include "torture/raw/proto.h" NTSTATUS torture_raw_init(void) { diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c index 7c8e78b160..fdb88b13dc 100644 --- a/source4/torture/rpc/rpc.c +++ b/source4/torture/rpc/rpc.c @@ -23,7 +23,7 @@ #include "lib/cmdline/popt_common.h" #include "librpc/rpc/dcerpc.h" #include "torture/rpc/rpc.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "librpc/ndr/ndr_table.h" #include "lib/util/dlinklist.h" diff --git a/source4/torture/rpc/rpc.h b/source4/torture/rpc/rpc.h index d0a0727787..48db814b7a 100644 --- a/source4/torture/rpc/rpc.h +++ b/source4/torture/rpc/rpc.h @@ -28,7 +28,7 @@ #include "librpc/rpc/dcerpc.h" #include "libcli/raw/libcliraw.h" #include "torture/rpc/proto.h" -#include "torture/ui.h" +#include "torture/torture.h" struct torture_rpc_tcase { struct torture_tcase tcase; diff --git a/source4/torture/rpc/spoolss_notify.c b/source4/torture/rpc/spoolss_notify.c index 19cff53d84..ab6309d55f 100644 --- a/source4/torture/rpc/spoolss_notify.c +++ b/source4/torture/rpc/spoolss_notify.c @@ -21,7 +21,6 @@ #include "includes.h" #include "torture/torture.h" -#include "torture/ui.h" #include "torture/rpc/rpc.h" #include "librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_server/dcerpc_server.h" diff --git a/source4/torture/rpc/spoolss_win.c b/source4/torture/rpc/spoolss_win.c index 9e2921d406..9ce9fb7526 100644 --- a/source4/torture/rpc/spoolss_win.c +++ b/source4/torture/rpc/spoolss_win.c @@ -20,7 +20,6 @@ #include "includes.h" #include "torture/torture.h" -#include "torture/ui.h" #include "torture/rpc/rpc.h" #include "librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_server/dcerpc_server.h" diff --git a/source4/torture/smb2/smb2.c b/source4/torture/smb2/smb2.c index f406b7d6e8..37eadcf7fd 100644 --- a/source4/torture/smb2/smb2.c +++ b/source4/torture/smb2/smb2.c @@ -21,7 +21,7 @@ #include "libcli/smb2/smb2.h" #include "libcli/smb2/smb2_calls.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "torture/smb2/proto.h" #include "lib/util/dlinklist.h" diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index 01a55a67f6..511f58cd7c 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -30,7 +30,7 @@ #include "lib/events/events.h" #include "dynconfig.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "build.h" #include "lib/util/dlinklist.h" #include "librpc/rpc/dcerpc.h" diff --git a/source4/torture/torture.h b/source4/torture/smbtorture.h index 26ecdb567b..3b5a573d83 100644 --- a/source4/torture/torture.h +++ b/source4/torture/smbtorture.h @@ -18,10 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef __TORTURE_H__ -#define __TORTURE_H__ +#ifndef __SMBTORTURE_H__ +#define __SMBTORTURE_H__ -#include "torture/ui.h" +#include "torture/torture.h" struct smbcli_state; @@ -37,5 +37,4 @@ struct torture_test; int torture_init(void); bool torture_register_suite(struct torture_suite *suite); - -#endif /* __TORTURE_H__ */ +#endif /* __SMBTORTURE_H__ */ diff --git a/source4/torture/unix/unix.c b/source4/torture/unix/unix.c index 05ea27db02..661e337270 100644 --- a/source4/torture/unix/unix.c +++ b/source4/torture/unix/unix.c @@ -18,7 +18,7 @@ */ #include "includes.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "torture/unix/proto.h" NTSTATUS torture_unix_init(void) diff --git a/source4/torture/util.h b/source4/torture/util.h index 1009fcf9f1..9dc948ade5 100644 --- a/source4/torture/util.h +++ b/source4/torture/util.h @@ -20,6 +20,11 @@ #ifndef _TORTURE_PROVISION_H_ #define _TORTURE_PROVISION_H_ +#include "torture/torture.h" + +struct smbcli_state; +struct smbcli_tree; + /** setup a directory ready for a test */ diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c index c1a20094f3..938e7d6c03 100644 --- a/source4/torture/util_smb.c +++ b/source4/torture/util_smb.c @@ -28,7 +28,6 @@ #include "system/shmem.h" #include "system/wait.h" #include "system/time.h" -#include "torture/ui.h" #include "torture/torture.h" #include "util/dlinklist.h" #include "auth/credentials/credentials.h" diff --git a/source4/torture/winbind/winbind.c b/source4/torture/winbind/winbind.c index e283602337..b12e92552e 100644 --- a/source4/torture/winbind/winbind.c +++ b/source4/torture/winbind/winbind.c @@ -18,7 +18,7 @@ */ #include "includes.h" -#include "torture/torture.h" +#include "torture/smbtorture.h" #include "torture/winbind/proto.h" NTSTATUS torture_winbind_init(void) |