Per Simo's request, here is a patch to enable the building (but not
executing) of tests for the SSSD. To build and run them, 'make check'
still works.

-- 
Stephen Gallagher
RHCE 804006346421761

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
From 0a74d5d472823ea72683217b4daaab9d253bcde7 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <[email protected]>
Date: Fri, 11 Sep 2009 15:32:19 -0400
Subject: [PATCH] Add 'make tests' target

---
 Makefile.am                         |    6 ++++++
 common/Makefile.am                  |    5 +++++
 common/collection/Makefile.am       |    2 ++
 common/dhash/Makefile.am            |    2 ++
 common/elapi/Makefile.am            |    5 +++++
 common/elapi/elapi_test/Makefile.am |    2 ++
 common/ini/Makefile.am              |    2 ++
 common/path_utils/Makefile.am       |    1 +
 common/trace/Makefile.am            |    2 ++
 replace/Makefile.am                 |    1 +
 server/Makefile.am                  |    2 ++
 sss_client/Makefile.am              |    3 +++
 12 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index d569605..15cca22 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,3 +32,9 @@ srpms: dist-gzip rpmroot
        rpmbuild --define "_topdir $(RPMBUILD)" \
                 --define _source_filedigest_algorithm=1 \
                 -bs SPECS/sssd.spec
+
+tests: all
+       for subdir in $(SUBDIRS); do \
+               $(MAKE) -C $$subdir $@; \
+       done
+
diff --git a/common/Makefile.am b/common/Makefile.am
index 445a843..ac75900 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -16,3 +16,8 @@ libsssd_util_la_CFLAGS = $(AM_CFLAGS) \
     -I ./elapi \
     -I ./trace
 endif
+
+tests: all
+       for subdir in $(SUBDIRS); do \
+               $(MAKE) -C $$subdir $@; \
+       done
diff --git a/common/collection/Makefile.am b/common/collection/Makefile.am
index 292a9a8..6102f65 100644
--- a/common/collection/Makefile.am
+++ b/common/collection/Makefile.am
@@ -43,3 +43,5 @@ collection_queue_ut_SOURCES = collection_queue_ut.c
 collection_queue_ut_LDADD = libcollection.la
 
 TESTS = collection_ut collection_stack_ut collection_queue_ut
+
+tests: all $(check_PROGRAMS)
diff --git a/common/dhash/Makefile.am b/common/dhash/Makefile.am
index b8d5ce6..71bc144 100644
--- a/common/dhash/Makefile.am
+++ b/common/dhash/Makefile.am
@@ -21,3 +21,5 @@ dhash_example_LDADD = dhash.o
 
 examplesdir = $(docdir)/examples
 dist_noinst_DATA += dhash_test.c dhash_example.c
+
+tests: all $(check_PROGRAMS)
diff --git a/common/elapi/Makefile.am b/common/elapi/Makefile.am
index c589ec5..7e487a2 100644
--- a/common/elapi/Makefile.am
+++ b/common/elapi/Makefile.am
@@ -58,3 +58,8 @@ libelapi_la_SOURCES = \
     elapi.h
 
 libelapi_la_LIBADD = libprovider.la libelapibasic.la
+
+tests: all
+       for subdir in $(SUBDIRS); do \
+               $(MAKE) -C $$subdir $@; \
+       done
diff --git a/common/elapi/elapi_test/Makefile.am 
b/common/elapi/elapi_test/Makefile.am
index f2368f1..1a0c6c9 100644
--- a/common/elapi/elapi_test/Makefile.am
+++ b/common/elapi/elapi_test/Makefile.am
@@ -47,3 +47,5 @@ elapi_ut_SOURCES = elapi_ut.c
 elapi_ut_LDADD = libelapi_test.la ../../ini/libini_config.la 
../../collection/libcollection.la -ldl
 
 TESTS = elapi_ut
+
+tests: all $(check_PROGRAMS)
diff --git a/common/ini/Makefile.am b/common/ini/Makefile.am
index 39ab40b..2679be3 100644
--- a/common/ini/Makefile.am
+++ b/common/ini/Makefile.am
@@ -34,3 +34,5 @@ ini_config_ut_SOURCES = ini_config_ut.c
 ini_config_ut_LDADD = libini_config.la ../collection/libcollection.la
 
 TESTS = ini_config_ut
+
+tests: all $(check_PROGRAMS)
diff --git a/common/path_utils/Makefile.am b/common/path_utils/Makefile.am
index fdda791..3961a06 100644
--- a/common/path_utils/Makefile.am
+++ b/common/path_utils/Makefile.am
@@ -15,3 +15,4 @@ libpath_utils_la_SOURCES = \
     path_utils.c \
     path_utils.h
 
+tests: all $(check_PROGRAMS)
diff --git a/common/trace/Makefile.am b/common/trace/Makefile.am
index f0cefd7..b097ff2 100644
--- a/common/trace/Makefile.am
+++ b/common/trace/Makefile.am
@@ -1 +1,3 @@
 dist_noinst_HEADERS = trace.h
+
+tests: all
diff --git a/replace/Makefile.am b/replace/Makefile.am
index 6a0cf57..9b5a663 100644
--- a/replace/Makefile.am
+++ b/replace/Makefile.am
@@ -48,3 +48,4 @@ libreplace_a_DEPENDENCIES = \
 libreplace_a_LIBADD = \
     @LIBREPLACEOBJ@
 
+tests: all
diff --git a/server/Makefile.am b/server/Makefile.am
index 50439b2..20df79e 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -492,3 +492,5 @@ installsssddirs::
 install-exec-hook: installsssddirs
 
 CLEANFILES = *.X */*.X */*/*.X
+
+tests: all $(check_PROGRAMS)
diff --git a/sss_client/Makefile.am b/sss_client/Makefile.am
index a8228ee..a831117 100644
--- a/sss_client/Makefile.am
+++ b/sss_client/Makefile.am
@@ -65,3 +65,6 @@ install-data-hook:
        mv $(DESTDIR)/$(nsslibdir)/libnss_sss.so 
$(DESTDIR)/$(nsslibdir)/libnss_sss.so.2
 
 CLEANFILES = *.X
+
+tests: all $(check_PROGRAMS)
+
-- 
1.6.2.5

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
sssd-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to