]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Add rpm conditionals : tests
authorOwen Synge <osynge@suse.com>
Fri, 29 May 2015 11:33:13 +0000 (13:33 +0200)
committerOwen Synge <osynge@suse.com>
Wed, 3 Jun 2015 13:55:14 +0000 (15:55 +0200)
Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
ceph.spec.in

index fcbce040d38f4504f4fcf870c716394469998927..4f91080f3848efc670400b08fc5a2062cbcd0857 100644 (file)
@@ -1,5 +1,6 @@
 %bcond_with ocf
 %bcond_without cephfs_java
+%bcond_with tests
 
 %if (0%{?el5} || (0%{?rhel_version} >= 500 && 0%{?rhel_version} <= 600))
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
@@ -516,6 +517,16 @@ sed -i -e "s/-lcurses/-lncurses/g" src/java/Makefile
 
 make -j$(getconf _NPROCESSORS_ONLN)
 
+
+%if 0%{with tests}
+%check
+# run in-tree unittests
+make -j$(getconf _NPROCESSORS_ONLN) check-local
+
+%endif
+
+
+
 %install
 make DESTDIR=$RPM_BUILD_ROOT install
 find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'