Hi,

0001: I got an error with older python version when just calling exit().
      'TypeError: 'str' object is not callable'

0002: make check failed when using the tar ball, because elapi_ut.conf
      was missing

0003: Older versions of check do not have test loops.

bye,
Sumit
From 131b0e03f4e181145cca2d0347a736edff2fdb6d Mon Sep 17 00:00:00 2001
From: Sumit Bose <sb...@redhat.com>
Date: Fri, 11 Dec 2009 15:37:00 +0100
Subject: [PATCH 1/3] Use sys.exit instead of exit

---
 server/config/SSSDConfigTest.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/server/config/SSSDConfigTest.py b/server/config/SSSDConfigTest.py
index 9b7599c..f893d98 100755
--- a/server/config/SSSDConfigTest.py
+++ b/server/config/SSSDConfigTest.py
@@ -1359,6 +1359,7 @@ if __name__ == "__main__":
     error = 0
 
     import os
+    import sys
     srcdir = os.getenv('srcdir')
     if srcdir:
         srcdir = srcdir + "/config"
@@ -1390,4 +1391,4 @@ if __name__ == "__main__":
     if not res.wasSuccessful():
         error |= 0x10
 
-    exit(error)
+    sys.exit(error)
-- 
1.6.5.2

From ad86ac3efa7b86dd86064168a71c1b105ce4e254 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sb...@redhat.com>
Date: Fri, 11 Dec 2009 16:12:20 +0100
Subject: [PATCH 2/3] Add elapi_ut.conf to the list of dist files

Some newlines are added, too.
---
 common/elapi/elapi_test/Makefile.am |    3 ++-
 common/elapi/elapi_test/elapi_ut.c  |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/common/elapi/elapi_test/Makefile.am 
b/common/elapi/elapi_test/Makefile.am
index d9f1bb0..8a24b9f 100644
--- a/common/elapi/elapi_test/Makefile.am
+++ b/common/elapi/elapi_test/Makefile.am
@@ -18,7 +18,8 @@ AM_CPPFLAGS = -I$(topdir) -I$(topdir)/ini -I$(topdir)/trace 
-I$(topdir)/collecti
 
 ACLOCAL_AMFLAGS = -I m4
 
-dist_noinst_DATA = m4
+dist_noinst_DATA = m4 \
+    elapi_ut.conf
 
 # Build library
 noinst_LTLIBRARIES = libelapi_test.la
diff --git a/common/elapi/elapi_test/elapi_ut.c 
b/common/elapi/elapi_test/elapi_ut.c
index ba493bb..49fe1a2 100644
--- a/common/elapi/elapi_test/elapi_ut.c
+++ b/common/elapi/elapi_test/elapi_ut.c
@@ -40,7 +40,7 @@ int elapi_init_test(void)
 
     error = elapi_init(APPNAME, "./"ELAPI_CONFIG_FILE);
     if (error) {
-        printf("elapi_init failed: %d", error);
+        printf("elapi_init failed: %d\n", error);
         return error;
     }
 
@@ -59,7 +59,7 @@ int elapi_get_default_tplt_test(void)
 
     error = elapi_get_default_tplt(&tpl);
     if (error) {
-        printf("elapi_get_default_tplt failed: %d", error);
+        printf("elapi_get_default_tplt failed: %d\n", error);
         return error;
     }
 
-- 
1.6.5.2

From 48855a0f7ea6cf74eacfd210cefe7fdc6421c12a Mon Sep 17 00:00:00 2001
From: Sumit Bose <sb...@redhat.com>
Date: Fri, 11 Dec 2009 16:15:41 +0100
Subject: [PATCH 3/3] Check for minimal version of check

Test loops and _i are only available since 0.9.5.
---
 server/configure.ac |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/configure.ac b/server/configure.ac
index e471c84..2c78846 100644
--- a/server/configure.ac
+++ b/server/configure.ac
@@ -113,7 +113,7 @@ AC_CHECK_HEADERS([sys/inotify.h])
 
 AC_CHECK_HEADERS([sasl/sasl.h],,AC_MSG_ERROR([Could not find SASL headers]))
 
-PKG_CHECK_MODULES([CHECK], [check], [have_check=1], [have_check=])
+PKG_CHECK_MODULES([CHECK], [check >= 0.9.5], [have_check=1], [have_check=])
 if test x$have_check = x; then
     AC_MSG_WARN([Without the 'CHECK' libraries, you will be unable to run all 
tests in the 'make check' suite])
 fi
-- 
1.6.5.2

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to