[packages/ceph] add tests bcond

atler atler at pld-linux.org
Tue Aug 10 01:16:31 CEST 2021


commit c37aec313f845569d103b3588a7439001817d6f4
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Aug 10 01:15:34 2021 +0200

    add tests bcond

 ceph.spec | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/ceph.spec b/ceph.spec
index 3e1e739..702f98f 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -19,6 +19,7 @@
 %bcond_without	lttng		# LTTng tracing
 %bcond_without	babeltrace	# Babeltrace traces support
 %bcond_without	tcmalloc	# tcmalloc allocator
+%bcond_with	tests		# build tests
 
 %ifarch x32
 %undefine	with_tcmalloc
@@ -309,7 +310,8 @@ cd build
 	-DWITH_SYSTEMD=ON \
 	%{?with_accelio:-DWITH_XIO=ON} \
 	%{?with_zfs:-DWITH_ZFS=ON} \
-	-DWITH_REENTRANT_STRSIGNAL=ON
+	-DWITH_REENTRANT_STRSIGNAL=ON \
+	%{!?with_tests:-DWITH_TESTS=OFF}
 
 %{__make}
 
@@ -340,8 +342,10 @@ cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/ceph.conf
 %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
 
+%if %{with tests}
 # tests
 %{__rm} $RPM_BUILD_ROOT%{_bindir}/ceph_test_*
+%endif
 # packaged as %doc
 %{__rm} $RPM_BUILD_ROOT%{_docdir}/sample.ceph.conf
 # cleanup
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ceph.git/commitdiff/c37aec313f845569d103b3588a7439001817d6f4



More information about the pld-cvs-commit mailing list