Add support to conditionally enable the testsuite.
rpmbuild --rebuild --with testsuite samba.rpm
This commit is contained in:
parent
ea0b80fa78
commit
009a9fa190
24
samba.spec
24
samba.spec
@ -1,3 +1,6 @@
|
|||||||
|
# Set --with testsuite or %bcond_without to run the Samba torture testsuite.
|
||||||
|
%bcond_with testsuite
|
||||||
|
|
||||||
%define main_release 170
|
%define main_release 170
|
||||||
|
|
||||||
%define samba_version 4.0.0
|
%define samba_version 4.0.0
|
||||||
@ -23,6 +26,12 @@
|
|||||||
%global with_mitkrb5 1
|
%global with_mitkrb5 1
|
||||||
%global with_dc 0
|
%global with_dc 0
|
||||||
|
|
||||||
|
%if %{with testsuite}
|
||||||
|
# The testsuite only works with a full build right now.
|
||||||
|
%global with_mitkrb5 0
|
||||||
|
%global with_dc 1
|
||||||
|
%endif
|
||||||
|
|
||||||
%global with_clustering_support 1
|
%global with_clustering_support 1
|
||||||
|
|
||||||
%{!?python_libdir: %define python_libdir %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1,1)")}
|
%{!?python_libdir: %define python_libdir %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1,1)")}
|
||||||
@ -482,6 +491,9 @@ the local kerberos library to use the same KDC as samba and winbind use
|
|||||||
--with-cluster-support \
|
--with-cluster-support \
|
||||||
--enable-old-ctdb \
|
--enable-old-ctdb \
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with testsuite}
|
||||||
|
--enable-selftest \
|
||||||
|
%endif
|
||||||
%if ! %with_pam_smbpass
|
%if ! %with_pam_smbpass
|
||||||
--without-pam_smbpass
|
--without-pam_smbpass
|
||||||
%endif
|
%endif
|
||||||
@ -584,6 +596,11 @@ rm -rf %{buildroot}%{perl_vendorlib}/Parse/Yapp
|
|||||||
# Fix up permission on perl install.
|
# Fix up permission on perl install.
|
||||||
%{_fixperms} %{buildroot}%{perl_vendorlib}
|
%{_fixperms} %{buildroot}%{perl_vendorlib}
|
||||||
|
|
||||||
|
%if %{with testsuite}
|
||||||
|
%check
|
||||||
|
TDB_NO_FSYNC=1 make %{?_smp_mflags} test
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post smb.service
|
%systemd_post smb.service
|
||||||
%systemd_post nmb.service
|
%systemd_post nmb.service
|
||||||
@ -1253,6 +1270,13 @@ rm -rf %{buildroot}
|
|||||||
%{_mandir}/man1/smbtorture.1*
|
%{_mandir}/man1/smbtorture.1*
|
||||||
%{_mandir}/man1/vfstest.1*
|
%{_mandir}/man1/vfstest.1*
|
||||||
|
|
||||||
|
%if %{with testsuite}
|
||||||
|
# files to ignore in testsuite mode
|
||||||
|
%{_libdir}/samba/libnss_wrapper.so
|
||||||
|
%{_libdir}/samba/libsocket_wrapper.so
|
||||||
|
%{_libdir}/samba/libuid_wrapper.so
|
||||||
|
%endif
|
||||||
|
|
||||||
### TEST-DEVEL
|
### TEST-DEVEL
|
||||||
%files test-devel
|
%files test-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Loading…
Reference in New Issue
Block a user