From: Owen Synge Date: Fri, 29 May 2015 11:33:13 +0000 (+0200) Subject: Add rpm conditionals : tests X-Git-Tag: v9.0.2~59^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5747ea1910c842cf8db38bdff367c3ca150ddaf6;p=ceph.git Add rpm conditionals : tests Extracted conditionals from SUSE rpm spec file to forward port. Original work done by Thorsten Behrens Signed-off-by: Owen Synge --- diff --git a/ceph.spec.in b/ceph.spec.in index fcbce040d38f4..4f91080f3848e 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -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 {} ';'