From 563fd8d208306d1b1e46048e7a0e28837cdc7185 Mon Sep 17 00:00:00 2001 From: Owen Synge Date: Fri, 29 May 2015 13:33:13 +0200 Subject: [PATCH] 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 (cherry picked from commit 5747ea1910c842cf8db38bdff367c3ca150ddaf6) --- ceph.spec.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ceph.spec.in b/ceph.spec.in index d2fb3bee0b8c9..3f936c5f9e356 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())")} @@ -504,6 +505,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 {} ';' -- 2.39.5