summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-11-22 10:06:57 +1300
committerIsaac Boukris <iboukris@sn-devel-184>2019-11-22 11:48:59 +0000
commit6107c79c90fdff3fe60e0d0ef3efe57b52b21262 (patch)
treec9c4d42768f075c5e9a3316ad889282c1ae7a2fe /libcli
parentf8947538b5e445ab9c1931d1f7826771ee582385 (diff)
downloadsamba-6107c79c90fdff3fe60e0d0ef3efe57b52b21262.tar.gz
build: Do not build selftest binaries for builds without --enable-selftest
Add new for_selftest option to SAMBA_BINARY() and SAMBA3_BINARY() This allows us to be much more consistent (at least in the core Samba) and documents clearly why the binary should not be installed. Not modified are - test_lp_load - notifyd-tests - gendrandperf - test* from examples/libsmbclient - dbwrap_torture - split_tokens - locktest2 - msgtest - msg_sink - msg_source - versiontest - rpc_open_tcp - test_headers As these are not tested in selftest so any change would also be untested. Of course they probably should be added in a different MR. Also not modified (because they are not tests, nor part of the build system) are: - smb2mount - notifydd - log2pacp - debug2html - smbfilter - destroy_netlogon_creds_cli - spotlight2* - tevent_glib_tracker These do however appear to be untested. For now, the source4 forked client tools are left unchanged: - smbclient4 - nmblookup4 Finally, the heimdal binaries are left as install=False as they are either part of the build system or end-user tools that we just don't want to install. These are however tested. The motivation is commit like c34ec003b7d45aa4196ff93a0ac29694b25e5309 and da87fa998ab71328f30bcdf5b41aee8675aee48a, which are both totally correct but are not needed if the selftest is not run on MacOS. There are likely other platforms or build environments where building our test binaries is more pain than valuable, see for example also https://lists.samba.org/archive/samba/2019-November/227137.html Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Autobuild-User(master): Isaac Boukris <iboukris@samba.org> Autobuild-Date(master): Fri Nov 22 11:48:59 UTC 2019 on sn-devel-184
Diffstat (limited to 'libcli')
-rw-r--r--libcli/auth/wscript_build8
-rw-r--r--libcli/dns/wscript_build4
-rw-r--r--libcli/drsuapi/wscript_build23
-rw-r--r--libcli/nbt/wscript_build2
-rw-r--r--libcli/smb/wscript2
5 files changed, 19 insertions, 20 deletions
diff --git a/libcli/auth/wscript_build b/libcli/auth/wscript_build
index f1d513e6449..c99ea4464af 100644
--- a/libcli/auth/wscript_build
+++ b/libcli/auth/wscript_build
@@ -52,7 +52,7 @@ bld.SAMBA_BINARY(
cmocka
talloc
''',
- install=False
+ for_selftest=True
)
bld.SAMBA_BINARY('test_rc4_passwd_buffer',
@@ -62,7 +62,7 @@ bld.SAMBA_BINARY('test_rc4_passwd_buffer',
LIBCLI_AUTH
cmocka
''',
- install=False)
+ for_selftest=True)
bld.SAMBA_BINARY('test_schannel',
source='tests/test_schannel.c',
@@ -70,7 +70,7 @@ bld.SAMBA_BINARY('test_schannel',
gensec
cmocka
''',
- install=False)
+ for_selftest=True)
bld.SAMBA_BINARY('test_gnutls',
source='tests/test_gnutls.c',
@@ -79,4 +79,4 @@ bld.SAMBA_BINARY('test_gnutls',
cmocka
samba-util
''',
- install=False)
+ for_selftest=True)
diff --git a/libcli/dns/wscript_build b/libcli/dns/wscript_build
index ea745c14028..2d90aa7ec0f 100644
--- a/libcli/dns/wscript_build
+++ b/libcli/dns/wscript_build
@@ -9,7 +9,7 @@ bld.SAMBA_BINARY('resolvconftest',
source='resolvconftest.c',
deps='clidns',
enabled=bld.CONFIG_SET('HAVE_FMEMOPEN'),
- install=False)
+ for_selftest=True)
bld.SAMBA_SUBSYSTEM('dns_lookup',
source='dns_lookup.c',
@@ -18,4 +18,4 @@ bld.SAMBA_SUBSYSTEM('dns_lookup',
bld.SAMBA_BINARY('dns_lookuptest',
source='dns_lookuptest.c',
deps='dns_lookup',
- install=False)
+ for_selftest=True)
diff --git a/libcli/drsuapi/wscript_build b/libcli/drsuapi/wscript_build
index 271248215be..1aee095130c 100644
--- a/libcli/drsuapi/wscript_build
+++ b/libcli/drsuapi/wscript_build
@@ -6,15 +6,14 @@ bld.SAMBA_SUBSYSTEM('LIBCLI_DRSUAPI',
public_deps='LIBCLI_AUTH samdb z'
)
-if bld.CONFIG_GET('ENABLE_SELFTEST'):
- bld.SAMBA_BINARY(
- 'test_repl_decrypt',
- source='tests/test_repl_decrypt.c',
- deps='''
- LIBCLI_DRSUAPI
- cmocka
- talloc
- ''',
- install=False,
- enabled=bld.AD_DC_BUILD_IS_ENABLED()
- )
+bld.SAMBA_BINARY(
+ 'test_repl_decrypt',
+ source='tests/test_repl_decrypt.c',
+ deps='''
+ LIBCLI_DRSUAPI
+ cmocka
+ talloc
+ ''',
+ for_selftest=True,
+ enabled=bld.AD_DC_BUILD_IS_ENABLED()
+)
diff --git a/libcli/nbt/wscript_build b/libcli/nbt/wscript_build
index 090789ce99a..15610765268 100644
--- a/libcli/nbt/wscript_build
+++ b/libcli/nbt/wscript_build
@@ -21,7 +21,7 @@ bld.SAMBA_BINARY('nmblookup' + bld.env.suffix4,
source='tools/nmblookup.c',
manpages='man/nmblookup4.1',
deps='samba-hostconfig samba-util cli-nbt popt POPT_SAMBA netif LIBCLI_RESOLVE',
- install=False
+ install=False,
)
bld.SAMBA_PYTHON('python_netbios',
diff --git a/libcli/smb/wscript b/libcli/smb/wscript
index 2fad5ee37c3..66c2b9b7e70 100644
--- a/libcli/smb/wscript
+++ b/libcli/smb/wscript
@@ -69,4 +69,4 @@ def build(bld):
bld.SAMBA_BINARY('test_smb1cli_session',
source='test_smb1cli_session.c',
deps='cmocka cli_smb_common',
- install=False)
+ for_selftest=True)