diff options
author | Niels de Vos <ndevos@redhat.com> | 2015-02-18 14:47:01 +0100 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-03-05 13:51:37 -0800 |
commit | bc2e58a436002e1627a225663bc7b11dddc1172f (patch) | |
tree | f586bcf41d82dcbb6979741ca299ff1291f9a8f7 /glusterfs.spec.in | |
parent | 0bef7717d3100734c6c5a4ba85de7a39e76774db (diff) |
testing: Switch to cmocka the successor of cmockery2
This uses https://cmocka.org/ as the unit testing framework.
With this change, unit testing is made optional as well. We assume there
is no cmocka available while building. cmocka will be enabled by default
later on. For now, to build with cmocka run:
$ ./configure --enable-cmocka
This change is based on the work of Andreas (replacing cmockery2 with
cmocka) and Kaleb (make cmockery2 an optional build dependency).
The only modifications I made, are additional #defines in unittest.h for
making sure the unit tests function as expected.
Change-Id: Iea4cbcdaf09996b49ffcf3680c76731459cb197e
BUG: 1067059
Merged-change: http://review.gluster.org/9762/
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Change-Id: Ia2e955481c102d5dce17695a9205395a6030e985
Reviewed-on: http://review.gluster.org/9738
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r-- | glusterfs.spec.in | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 85695092755..dec67e2a637 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -9,6 +9,10 @@ ## All argument definitions should be placed here and keep them sorted ## +# if you wish to compile an rpm with cmocka unit testing... +# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with cmocka +%{?_with_cmocka:%global _with_cmocka --enable-cmocka} + # if you wish to compile an rpm without rdma support, compile like this... # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without rdma %{?_without_rdma:%global _without_rdma --disable-ibverbs} @@ -196,8 +200,10 @@ BuildRequires: libxml2-devel openssl-devel BuildRequires: libaio-devel BuildRequires: python-devel BuildRequires: python-ctypes -BuildRequires: cmockery2-devel BuildRequires: userspace-rcu-devel >= 0.7 +%if ( 0%{?_with_cmocka:0} ) +BuildRequires: libcmocka-devel >= 1.0.0 +%endif %if ( 0%{!?_without_systemtap:1} ) BuildRequires: systemtap-sdt-devel %endif @@ -501,7 +507,8 @@ This package provides the glusterfs server daemon. %{?_without_syslog} \ %{?_without_bd} \ %{?_without_qemu_block} \ - %{?_without_systemtap} + %{?_without_systemtap} \ + %{?_with_cmocka} # fix hardening and remove rpath in shlibs %if ( 0%{?fedora} && 0%{?fedora} > 17 ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) @@ -1039,6 +1046,12 @@ fi %ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/run/nfs.pid %changelog +* Thu Feb 26 2015 Kaleb S. KEITHLEY <kkeithle@redhat.com> +- enable cmocka unittest support only when asked for (#1067059) + +* Wed Feb 18 2015 Andreas Schneider <asn@redhat.com> +- Change cmockery2 to cmocka. + * Wed Feb 18 2015 Kaushal M <kaushal@redhat.com> - add userspace-rcu as a requirement |