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 --- libglusterfs/src/Makefile.am | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libglusterfs/src/Makefile.am') diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am index 634e217ed..ac6a3b9ec 100644 --- a/libglusterfs/src/Makefile.am +++ b/libglusterfs/src/Makefile.am @@ -55,3 +55,20 @@ 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 -- cgit