From c817c214033481fe59f9f44c325a9092dc337d07 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Thu, 20 Feb 2014 13:50:19 -0500 Subject: build: GlusterFS Unit Test Framework This patch will allow for developers to create unit tests for their code. Documentation has been added to the patch and is available here: doc/hacker-guide/en-US/markdown/unittest.md Also, unit tests are run when RPM is created. BUG: 1067059 Change-Id: I95cf8bb0354d4ca4ed4476a0f2385436a17d2369 Signed-off-by: Vijay Bellur Signed-off-by: Luis Pabon Reviewed-on: http://review.gluster.org/7145 Tested-by: Gluster Build System Reviewed-by: Rajesh Joseph Reviewed-by: Justin Clift Tested-by: Justin Clift --- configure.ac | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 69d25e4da..626f6f628 100644 --- a/configure.ac +++ b/configure.ac @@ -630,6 +630,18 @@ 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) @@ -900,7 +912,7 @@ CONTRIBDIR='$(top_srcdir)/contrib' AC_SUBST(CONTRIBDIR) GF_CPPDEFINES='-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS)' -GF_CPPINCLUDES='-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/uuid' +GF_CPPINCLUDES='-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/uuid $(UNITTEST_CPPFLAGS)' GF_CPPFLAGS="$GF_CPPDEFINES $GF_CPPINCLUDES" AC_SUBST([GF_CPPFLAGS]) -- cgit From ecc475d0a517d7f58014bed93fc0957b3369d1b7 Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Thu, 6 Mar 2014 19:09:13 +0530 Subject: hook-scripts: Move smb hooks to right place. Moved the hook-scripts to dirs corresponding to event. Also, edited S30samba-set.sh to with changes in other two hook scripts to bring uniformity. Change-Id: Ib98c0a18d4bb5d0ba4b881b2e19b40d72580b1c2 BUG: 1073468 Signed-off-by: Raghavendra Talur Reviewed-on: http://review.gluster.org/7201 Reviewed-by: Poornima G Reviewed-by: Bala FA Tested-by: Gluster Build System --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 626f6f628..3e34673f5 100644 --- a/configure.ac +++ b/configure.ac @@ -165,6 +165,12 @@ AC_CONFIG_FILES([Makefile extras/hook-scripts/add-brick/Makefile extras/hook-scripts/add-brick/pre/Makefile extras/hook-scripts/add-brick/post/Makefile + extras/hook-scripts/start/Makefile + extras/hook-scripts/start/post/Makefile + extras/hook-scripts/set/Makefile + extras/hook-scripts/set/post/Makefile + extras/hook-scripts/stop/Makefile + extras/hook-scripts/stop/pre/Makefile contrib/fuse-util/Makefile contrib/uuid/uuid_types.h glusterfs-api.pc -- cgit From 6224e878cdf780360b49760c4b0c20584bbc0b6f Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Sun, 16 Mar 2014 23:07:19 -0400 Subject: build: Remove cmockery2 from repo While we wait for cmockery2 to be available from Fedora, we can remove cmockery2 from the repo. BUG: 1077011 Change-Id: I75d462c607cd376a5d838ea83f4d12eb59757e73 Signed-off-by: Luis Pabon Reviewed-on: http://review.gluster.org/7281 Reviewed-by: Justin Clift Tested-by: Gluster Build System Reviewed-by: Harshavardhana Reviewed-by: Niels de Vos Reviewed-by: Anand Avati --- configure.ac | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3e34673f5..d3f5c1b18 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) -- cgit