From a0f0350252fb079d9ffec9b7f3589e97872688f9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 10 May 2018 14:00:54 +1200 Subject: [PATCH] selftest: Require libarchive for --enable-selftest This avoids one more case where tests can go missing by removing the conditional. (Yes, this has happend for other tests in the past). Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher Reviewed-by: Gary Lockyer Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Tue May 15 06:31:03 CEST 2018 on sn-devel-144 --- source3/selftest/tests.py | 47 ++++++++++++++++++--------------------- source3/wscript | 4 ++++ 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index 5ebebb5d14f..1e1f97efa40 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -54,7 +54,6 @@ try: finally: f.close() -have_libarchive = ("HAVE_LIBARCHIVE" in config_hash) have_linux_kernel_oplocks = ("HAVE_KERNEL_OPLOCKS_LINUX" in config_hash) have_inotify = ("HAVE_INOTIFY" in config_hash) have_ldwrap = ("HAVE_LDWRAP" in config_hash) @@ -295,31 +294,29 @@ for env in ["fileserver"]: # tar command tests # - # tar command enabled only if built with libarchive - if have_libarchive: - # Test smbclient/tarmode - plantestsuite("samba3.blackbox.smbclient_tarmode.NT1", env, - [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"), - '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', - '$LOCAL_PATH/tarmode', '$PREFIX', smbclient3, configuration, "-mNT1"]) - plantestsuite("samba3.blackbox.smbclient_tarmode.SMB3", env, - [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"), - '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', - '$LOCAL_PATH/tarmode', '$PREFIX', smbclient3, configuration, "-mSMB3"]) + # Test smbclient/tarmode + plantestsuite("samba3.blackbox.smbclient_tarmode.NT1", env, + [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"), + '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', + '$LOCAL_PATH/tarmode', '$PREFIX', smbclient3, configuration, "-mNT1"]) + plantestsuite("samba3.blackbox.smbclient_tarmode.SMB3", env, + [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.sh"), + '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', + '$LOCAL_PATH/tarmode', '$PREFIX', smbclient3, configuration, "-mSMB3"]) - # Test suite for new smbclient/tar with libarchive (GSoC 13) - plantestsuite("samba3.blackbox.smbclient_tar.NT1", env, - [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"), - '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp', - '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode', - '-d', '$PREFIX', '-b', smbclient3, - '--subunit', '--', configuration, '-mNT1']) - plantestsuite("samba3.blackbox.smbclient_tar.SMB3", env, - [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"), - '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp', - '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode', - '-d', '$PREFIX', '-b', smbclient3, - '--subunit', '--', configuration, '-mSMB3']) + # Test suite for new smbclient/tar with libarchive (GSoC 13) + plantestsuite("samba3.blackbox.smbclient_tar.NT1", env, + [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"), + '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp', + '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode', + '-d', '$PREFIX', '-b', smbclient3, + '--subunit', '--', configuration, '-mNT1']) + plantestsuite("samba3.blackbox.smbclient_tar.SMB3", env, + [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"), + '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tmp', + '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode', + '-d', '$PREFIX', '-b', smbclient3, + '--subunit', '--', configuration, '-mSMB3']) plantestsuite("samba3.blackbox.net_usershare", "fileserver:local", [os.path.join(samba3srcdir, "script/tests/test_net_usershare.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', smbclient3]) diff --git a/source3/wscript b/source3/wscript index 7a1c579ef67..633a3655b21 100644 --- a/source3/wscript +++ b/source3/wscript @@ -228,6 +228,10 @@ main() { "build without libarchive support. " "libarchive support is required for the smbclient " "tar-file mode") + elif conf.CONFIG_GET('ENABLE_SELFTEST'): + raise Utils.WafError('libarchive library required for ' + '--enable-selftest') + # check for DMAPI libs if Options.options.with_dmapi == False: