summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--Makefile.am2
-rwxr-xr-xautogen.sh6
m---------cmockery20
-rw-r--r--configure.ac12
-rw-r--r--glusterfs.spec.in7
-rw-r--r--libglusterfs/src/Makefile.am17
-rw-r--r--libglusterfs/src/mem-pool.c9
-rw-r--r--xlators/cluster/dht/src/Makefile.am15
-rw-r--r--xlators/cluster/dht/src/dht-layout.c21
10 files changed, 1 insertions, 91 deletions
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 58165fe0a7d..00000000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "cmockery2"]
- path = cmockery2
- url = https://github.com/lpabon/cmockery2.git
diff --git a/Makefile.am b/Makefile.am
index 815d6ad3e5f..598ebb4103c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@ EXTRA_DIST = autogen.sh \
gen-headers.py run-tests.sh \
$(shell find $(top_srcdir)/tests -type f -print)
-SUBDIRS = argp-standalone cmockery2 libglusterfs rpc api xlators glusterfsd \
+SUBDIRS = argp-standalone libglusterfs rpc api xlators glusterfsd \
$(FUSERMOUNT_SUBDIR) doc extras cli @SYNCDAEMON_SUBDIR@
pkgconfigdir = @pkgconfigdir@
diff --git a/autogen.sh b/autogen.sh
index 221cc2b7819..8642deba27c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -106,15 +106,9 @@ $AUTOCONF
echo Running ${AUTOMAKE}...
$AUTOMAKE --add-missing --copy --foreign
-# Update git modules
-echo "Obtaining git module cmockery2 ..."
-git submodule update --init cmockery2
-
# Run autogen in the argp-standalone sub-directory
echo "Running autogen.sh in argp-standalone ..."
( cd argp-standalone;./autogen.sh )
-echo "Running autogen.sh in cmockery2 ..."
-( cd cmockery2; ./autogen.sh )
# Instruct user on next steps
echo
diff --git a/cmockery2 b/cmockery2
deleted file mode 160000
-Subproject 4eb53ab96fd2b227fbf68c40bcc8d915b48213b
diff --git a/configure.ac b/configure.ac
index 3e34673f52c..d3f5c1b1883 100644
--- a/configure.ac
+++ b/configure.ac
@@ -636,18 +636,6 @@ AC_SUBST(HAVE_LINKAT)
dnl check for Monotonic clock
AC_CHECK_FUNC([clock_gettime], [has_monotonic_clock=yes], AC_CHECK_LIB([rt], [clock_gettime], , AC_MSG_WARN([System doesn't have monotonic clock using contrib])))
-dnl Add cmockery2 for unit testing
-AC_CONFIG_SUBDIRS([cmockery2])
-UNITTEST_CFLAGS='-g -Wall -DUNIT_TESTING=1 -DDEBUG -Werror -O0 --coverage'
-UNITTEST_CPPFLAGS='-I$(top_srcdir)/cmockery2/src'
-UNITTEST_LDADD='$(top_builddir)/cmockery2/libcmockery.la'
-UNITTEST_LDFLAGS=-lgcov
-CFLAGS="$CFLAGS ${UNITTEST_CPPFLAGS}"
-AC_SUBST(UNITTEST_CFLAGS)
-AC_SUBST(UNITTEST_CPPFLAGS)
-AC_SUBST(UNITTEST_LDADD)
-AC_SUBST(UNITTEST_LDFLAGS)
-
dnl Check for argp
AC_CHECK_HEADER([argp.h], AC_DEFINE(HAVE_ARGP, 1, [have argp]))
AC_CONFIG_SUBDIRS(argp-standalone)
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 4ed1a75ed84..f3038eaa40d 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -455,10 +455,6 @@ pushd api/examples
FLAGS="$RPM_OPT_FLAGS" python setup.py build
popd
-%check
-
-LD_LIBRARY_PATH=$PWD/cmockery2/.libs make check
-
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
@@ -677,9 +673,6 @@ rm -rf %{buildroot}
%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/encryption/rot-13*
%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/mac-compat*
%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/testing/performance/symlink-cache*
-# exclude cmockery
-%exclude %{_includedir}/cmockery*
-%exclude %{_prefix}/share/doc/cmockery*
%post libs
/sbin/ldconfig
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index ac6a3b9ecde..634e217ed4d 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -55,20 +55,3 @@ y.tab.h: graph.y
CLEANFILES = graph.lex.c y.tab.c y.tab.h
CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
-
-#### UNIT TESTS #####
-CLEANFILES += *.gcda *.gcno *_xunit.xml
-noinst_PROGRAMS =
-TESTS =
-
-mem_pool_unittest_CPPFLAGS = $(UNITTEST_CPPFLAGS) $(libglusterfs_la_CPPFLAGS)
-mem_pool_unittest_SOURCES = mem-pool.c \
- mem-pool.h \
- unittest/mem_pool_unittest.c \
- unittest/log_mock.c \
- unittest/global_mock.c
-mem_pool_unittest_CFLAGS = $(UNITTEST_CFLAGS)
-mem_pool_unittest_LDADD = $(UNITTEST_LDADD)
-mem_pool_unittest_LDFLAGS = $(UNITTEST_LDFLAGS)
-noinst_PROGRAMS += mem_pool_unittest
-TESTS += mem_pool_unittest
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c
index 96e04910513..b92803d4d3d 100644
--- a/libglusterfs/src/mem-pool.c
+++ b/libglusterfs/src/mem-pool.c
@@ -24,24 +24,17 @@
#define GLUSTERFS_ENV_MEM_ACCT_STR "GLUSTERFS_DISABLE_MEM_ACCT"
-#include <cmockery/pbc.h>
-#include <cmockery/cmockery_override.h>
-
void
gf_mem_acct_enable_set (void *data)
{
glusterfs_ctx_t *ctx = NULL;
- REQUIRE(data != NULL);
-
ctx = data;
GF_ASSERT (ctx != NULL);
ctx->mem_acct_enable = 1;
- ENSURE(1 == ctx->mem_acct_enable);
-
return;
}
@@ -156,8 +149,6 @@ __gf_realloc (void *ptr, size_t size)
if (!THIS->ctx->mem_acct_enable)
return REALLOC (ptr, size);
- REQUIRE(NULL != ptr);
-
tot_size = size + GF_MEM_HEADER_SIZE + GF_MEM_TRAILER_SIZE;
orig_ptr = (char *)ptr - 8 - 4;
diff --git a/xlators/cluster/dht/src/Makefile.am b/xlators/cluster/dht/src/Makefile.am
index 3032705b5d5..174bea84110 100644
--- a/xlators/cluster/dht/src/Makefile.am
+++ b/xlators/cluster/dht/src/Makefile.am
@@ -36,18 +36,3 @@ uninstall-local:
install-data-hook:
ln -sf dht.so $(DESTDIR)$(xlatordir)/distribute.so
-
-#### UNIT TESTS #####
-CLEANFILES += *.gcda *.gcno *_xunit.xml
-noinst_PROGRAMS =
-TESTS =
-
-dht_layout_unittest_CPPFLAGS = $(UNITTEST_CPPFLAGS) $(AM_CPPFLAGS)
-dht_layout_unittest_SOURCES = unittest/dht_layout_unittest.c \
- unittest/dht_layout_mock.c \
- dht-layout.c
-dht_layout_unittest_CFLAGS = $(UNITTEST_CFLAGS)
-dht_layout_unittest_LDADD = $(UNITTEST_LDADD)
-dht_layout_unittest_LDFLAGS = $(UNITTEST_LDFLAGS)
-noinst_PROGRAMS += dht_layout_unittest
-TESTS += dht_layout_unittest
diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c
index deaa493f908..e1a37b77cda 100644
--- a/xlators/cluster/dht/src/dht-layout.c
+++ b/xlators/cluster/dht/src/dht-layout.c
@@ -25,29 +25,12 @@
#define layout_size(cnt) (layout_base_size + (cnt * layout_entry_size))
-#include <cmockery/pbc.h>
-#include <cmockery/cmockery_override.h>
-
-// Change GF_CALLOC and GF_FREE to use
-// cmockery2 memory allocation versions
-#ifdef UNIT_TESTING
-#undef GF_CALLOC
-#define GF_CALLOC(n, s, t) test_calloc(n, s)
-#undef GF_FREE
-#define GF_FREE test_free
-#endif
-
-
-
dht_layout_t *
dht_layout_new (xlator_t *this, int cnt)
{
dht_layout_t *layout = NULL;
dht_conf_t *conf = NULL;
- REQUIRE(NULL != this);
- REQUIRE(cnt >= 0);
-
conf = this->private;
layout = GF_CALLOC (1, layout_size (cnt),
@@ -66,10 +49,6 @@ dht_layout_new (xlator_t *this, int cnt)
layout->ref = 1;
- ENSURE(NULL != layout);
- ENSURE(layout->type == DHT_HASH_TYPE_DM);
- ENSURE(layout->cnt == cnt);
- ENSURE(layout->ref == 1);
out:
return layout;
}