build: Do not build selftest binaries for builds without --enable-selftest
authorAndrew Bartlett <abartlet@samba.org>
Thu, 21 Nov 2019 21:06:57 +0000 (10:06 +1300)
committerIsaac Boukris <iboukris@sn-devel-184>
Fri, 22 Nov 2019 11:48:59 +0000 (11:48 +0000)
commit6107c79c90fdff3fe60e0d0ef3efe57b52b21262
treec9c4d42768f075c5e9a3316ad889282c1ae7a2fe
parentf8947538b5e445ab9c1931d1f7826771ee582385
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
18 files changed:
buildtools/wafsamba/wafsamba.py
lib/async_req/wscript_build
lib/audit_logging/wscript_build
lib/pthreadpool/wscript_build
lib/texpect/wscript
lib/util/wscript_build
libcli/auth/wscript_build
libcli/dns/wscript_build
libcli/drsuapi/wscript_build
libcli/nbt/wscript_build
libcli/smb/wscript
nsswitch/wscript_build
source3/modules/wscript_build
source3/wscript_build
source4/auth/wscript_build
source4/dsdb/samdb/ldb_modules/wscript_build
source4/dsdb/samdb/ldb_modules/wscript_build_server
source4/rpc_server/wscript_build